strip,unstrip: Use and set shdrstrndx consistently.
authorMark Wielaard <mark@klomp.org>
Sat, 4 Aug 2018 18:29:25 +0000 (20:29 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 13 Sep 2018 22:43:27 +0000 (00:43 +0200)
commitd5b050281e43754ac444e39d3e392831f4488c59
tree709e05fa8f0c15ae8b383ef51ec477f1d0898aa5
parentb14633d41673bb1903c887cb9ffd55fe700c4eb1
strip,unstrip: Use and set shdrstrndx consistently.

In various places in strip we used e_shstrndx instead of shdrstrndx and we
didn't setup the shdrstrndx for the debug file. In unstrip we forgot to copy
the shdrstrndx in case the -o output option was used.

Added a new testcase that adds many sections to a testfile and runs strip, elflint,
unstrip and elfcmp.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/strip.c
src/unstrip.c
tests/ChangeLog
tests/Makefile.am
tests/run-strip-test-many.sh [new file with mode: 0755]