[llvm] r211150 - [llvm-readobj][ELF] New `-mips-plt-got` command line option to output
Rafael Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 11:47:24 PST 2016
> You are right, in general case this function might return unexpected
> section. A better name for it is 'findFirstSectionAtAddress'.
> AFAIK dynamic linker and readelf tool do not rely on the actual
> section size. They use DT_PLTGOT to find section address,
> DT_MIPS_LOCAL_GOTNO to iterate over local GOT entries and
> DT_MIPS_SYMTABNO/DT_MIPS_GOTSYM to iterate over global GOT entries.
> I do not know what is the best solution in our case. Probably more
> accurate approach is to find a section with specified address and
> non-zero size. I can take a look at this problem if you do not plan to
> fix it by yourself.
Can't you use DT_MIPS_SYMTABNO like the dynamic linker?
More information about the llvm-commits