This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ELF DT_HASH hash-table entry size.
- From: Richard Henderson <rth at redhat dot com>
- To: binutils at sources dot redhat dot com, Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- Date: Mon, 21 Feb 2005 11:23:12 -0800
- Subject: Re: ELF DT_HASH hash-table entry size.
- References: <20050221025708.GE3780@bubble.modra.org>
On Mon, Feb 21, 2005 at 01:27:08PM +1030, Alan Modra wrote:
> elf64-alpha.c and elf64-s390.c both define a hash entry size of 8. This
> violates the ELF spec, which say the entry size is always 4. Was the
> alpha and s390 choice deliberate, or is this just an accident?
Accidental. BFD was wrong for *all* 64-bit ELF ports at one time.
Alpha was the only one that had been in general use when the problem
was discovered and fixed. But it was too late to change for Alpha
without breaking binary compatibility.
Dunno what s390's excuse is.
> Note that using a size of 8 has practical difficulties: An executable
> without a section header has no way to communicate to generic ELF tools
> like readelf (via sh_ent_size) that the hash table is unusual.
Huh? An executable without a section header? If you don't have a
section header then you don't have a symbol table, so the point is
moot.
r~