[PATCH] D60555: [llvm-objcopy] Fill .symtab_shndx section correctly

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 03:05:38 PDT 2019


arichardson added a comment.

In D60555#1462414 <https://reviews.llvm.org/D60555#1462414>, @jhenderson wrote:

> In D60555#1462406 <https://reviews.llvm.org/D60555#1462406>, @evgeny777 wrote:
>
> > > Test case?
> >
> > Have you seen bug description?
> >  The problem with test case is that it requires file with large number of sections of which at least some should have relocation sections. 
> >  I have 19Mb object file generated by clang, but I'm not sure if using it as test case is a good idea ...
>
>
> Sorry, I skipped over that somehow (I think I jumped straight from the bug). We already have at least one test that uses many sections (see many-sections.test). That unzips a pre-built object to achieve this. One option might be to update that object file (and possibly the test), if it can satisfy the prerequisites you need.


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


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60555/new/

https://reviews.llvm.org/D60555





More information about the llvm-commits mailing list