[llvm] r211150 - [llvm-readobj][ELF] New `-mips-plt-got` command line option to output

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 09:10:28 PST 2016


On Wed, Feb 3, 2016 at 12:16 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> Yes, it is possible. But in that case we can miss some kind of invalid
>> GOT. For example, if .got section size is less than the number
>> calculated from DT_MIPS_LOCAL_GOTNO / DT_MIPS_SYMTABNO /
>> DT_MIPS_GOTSYM we will not show any error. One more point - TLS and
>> multi-GOT entries. They live beyond local/global part of GOT. Now
>> llvm-readobj shows their number using .got section size.
>
> I see.
>
> IMHO there are two ways to look at this:
> * We want to print the dynamic linkers view. In this case we should
> not look for sections at all. Note that the section table is actually
> optional.
> * We want to print the entire .got section. In this case I think we
> should make the search as specific as possible and make sure there is
> only one match. For example, check that there is only one section
> named .got and use that.

I like the second way. But I think it is enough to find noz-zero sized
section by address taken from the PLTGOT tag. In theory it is possible
to give GOT section an arbitrary name. Anyway I am going to redesign
findSectionByAddress and surrounded code.

Regards,
Simon


More information about the llvm-commits mailing list