[PATCH] D60555: [llvm-objcopy] Fill .symtab_shndx section correctly
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 02:34:23 PDT 2019
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
LGTM.
In D60555#1462432 <https://reviews.llvm.org/D60555#1462432>, @arichardson wrote:
> Could we use llvm-mc and some loop macros to generate a binary with the required amount of sections?
> I did that for a testcase that needed 32768 symbols: https://github.com/llvm/llvm-project/blob/master/lld/test/ELF/mips-out-of-bounds-call16-reloc.s
Good tip, thanks. It's probably worth bearing in mind in case we have any more tests along these lines that the existing pre-canned binary can't be used for.
================
Comment at: test/tools/llvm-objcopy/ELF/many-sections.test:56
+
+# SYM_SEC_IDS: 61423: 0000000000000000 0 NOTYPE LOCAL DEFAULT PRC[0xff01] s9
+# SYM_SEC_IDS-NEXT: 61424: 0000000000000000 0 NOTYPE LOCAL DEFAULT PRC[0xff00] s9
----------------
Looks to me like you've hit a bug here. This should actually be index 0xff01 (going via SHN_XINDEX), not PRC[0xff01] which is a reserved value. readelf will print 65281 here. Could you file a bug against llvm-readobj, please?
You might want to consider using llvm-readobj instead of llvm-readelf, as this doesn't have that bug.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60555/new/
https://reviews.llvm.org/D60555
More information about the llvm-commits
mailing list