This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: More than 65536 sections in an ELF file
- From: Andreas Schwab <schwab at suse dot de>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Sat, 08 Mar 2008 09:59:36 +0100
- Subject: Re: More than 65536 sections in an ELF file
- References: <m3od9qf4pv.fsf@google.com>
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."