Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 22 Mar 2024 16:36:49 +0000
From: Brooks Davis <brooks@...ebsd.org>
To: libc-coord@...ts.openwall.com
Cc: Sevan Janiyan <venture37@...klan.co.uk>
Subject: Re: Elf_GNU_Hash_Header

On Fri, Mar 22, 2024 at 05:08:28PM +0100, Florian Weimer wrote:
> * Sevan Janiyan:
> 
> > On 22/03/2024 02:52, Brooks Davis wrote:
> >> It was added it 2009 by the author of elftoolchain which is its only
> >> consumer AFACT.  If no one else has added I doubt there is much demand
> >> for it and it's probably a mistake that it's in sys/elf_common.h.
> >
> > http://www.linker-aliens.org/blogs/ali/entry/gnu_hash_elf_sections/
> >
> > elftoolchain author:
> >
> > On 22/03/2024 13:44, Joseph Koshy wrote:
> >>> } Elf_GNU_Hash_Header;
> >> IIRC this is a GNU extension to the ELF file format that we started
> >> supporting in 2009:
> >>
> >> https://sourceware.org/legacy-ml/binutils/2006-10/msg00377.html
> >>
> >> I haven't checked if the extension is still in use.  It is probably
> >> still in use (in some form), since it was created to address a
> >> shortcoming of ELF at that time.
> 
> We still use DT_GNU_HASH on GNU/Linux.  Most Linux distributions
> disabled DT_HASH generation and switched to DT_GNU_HASH exclusively
> (except for glibc).  This means that for GNU/Linux, DT_GNU_HASH support
> is de facto mandatory, and has been for many, many years.

FreeBSD also uses DT_GNU_HASH and I agree it's the de facto standard.
This is IMO unrelated to the question of the usefulness of this
particular non-portable typedef.

-- Brooks

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.