[llvm-objcopy] Fix strip-all-gnu test
authorAnton Sidorenko <anton.sidorenko@syntacore.com>
Wed, 1 Feb 2023 15:58:24 +0000 (18:58 +0300)
committerAnton Sidorenko <anton.sidorenko@syntacore.com>
Fri, 3 Feb 2023 10:08:17 +0000 (13:08 +0300)
commit137078de13584f467bf48b4fca41e34781211773
tree61254876fc15c6d97c676ba73f0f298fb57d4ee7
parent5f99a517452491e5f27226e0ea725c1d0f7d3d76
[llvm-objcopy] Fix strip-all-gnu test

Originally the test has a bug: in the input YAML `.symtab.dyn` section has a type
repeated twice with different values (SHT_SYMTAB and SHT_NOBITS). YAML parser
took SHT_NOBITS as a type of the section, so the test wasn't checking the desired
case.

This patch changes the test to verify that a section with SHT_SYMTAB type and
SHF_ALLOC flag is not removed when --strip-all-gnu flag present.

Differential Revision: https://reviews.llvm.org/D143086
llvm/test/tools/llvm-objcopy/ELF/strip-all-gnu.test