More than 65536 sections in an ELF file
Andreas Schwab
schwab@suse.de
Sat Mar 8 09:00:00 GMT 2008
Ian Lance Taylor <iant@google.com> writes:
> So what I expect to see is that the section header at index 0 will
> have an sh_size field of 70010 and an sh_link field of 70006. What I
> see in fact is an sh_size field of 70010 and an sh_link field of
> 70262. That is because BFD has added SHN_HIRESERVE - SHN_LORESERVE ==
> 256 to the section number of the section name string table. 70006 +
> 256 == 70262.
But the index numbers SHN_LORESERVE to SHN_HIRESERVE have a special
meaning, eg. a st_shndx of SHN_COMMON means that the symbol is a common
symbol. How would you distinguish that from a symbol in section number
65522? The only way to do that is to skip the 256 logical indexes from
0xFF00 to 0xFFFF.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Binutils
mailing list