[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/5900] ELF files with more than 65536 sections not handled corre

From: ian at airs dot com
Subject: [Bug gas/5900] ELF files with more than 65536 sections not handled correctly.
Date: 10 Mar 2008 03:00:18 -0000

------- Additional Comments From ian at airs dot com  2008-03-10 03:00 -------
I think you need to qualify what you say.  It is clearly true that the st_shndx
field of a symbol is not a pure section index.  Any value above LORESERVE is
indeed reserved.  The ELF ABI defines what to do for a symbol whose section
index is larger than LORESERVE: put SHN_XINDEX in the st_shndx field, and put
the real section index in the corresponding entry in the SHT_SYMTAB_SHNDX
section.  Note that the ABI does not say to store the section index plus 256; it
says to store the section index.

None of this has anything to do with the sh_link field in section header 0 when
the section string table is larger than LORESERVE.  In that case, I think the
ELF ABI says to put the section index in the sh_link field.  It does not say to
put the section index plus 256.  Currently BFD is putting the section index plus
256.  I think that is wrong.

For the original test case, for a symbol defined in a section whose index is
larger than LORESERVE, what does icc put in the SHT_SYMTAB_SHNDX section?  Does
it put the section index, or the section index plus 256?  I believe that the ELF
ABI says that it should store the former.  BFD stores the latter.  What does the
BFD readelf -s report for those symbols in the object compiled by icc?



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]