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: Daniel Jacobowitz <drow at false dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: binutils at sources dot redhat dot com,Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- Date: Mon, 21 Feb 2005 15:16:31 -0500
- Subject: Re: ELF DT_HASH hash-table entry size.
- References: <20050221025708.GE3780@bubble.modra.org> <20050221192312.GA31162@redhat.com>
On Mon, Feb 21, 2005 at 11:23:12AM -0800, Richard Henderson wrote:
> 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.
Doesn't it also apply to .dynsym?
--
Daniel Jacobowitz
CodeSourcery, LLC