Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZfzycoAtCEdMqNEf@spindle.one-eyed-alien.net>
Date: Fri, 22 Mar 2024 02:52:34 +0000
From: Brooks Davis <brooks@...ebsd.org>
To: libc-coord@...ts.openwall.com
Subject: Re: Elf_GNU_Hash_Header

On Thu, Mar 21, 2024 at 05:47:53PM -0700, enh wrote:
> i see FreeBSD added this:

> typedef struct {
>   u_int32_t gh_nbuckets; /* Number of hash buckets. */
>   u_int32_t gh_symndx; /* First visible symbol in .dynsym. */
>   u_int32_t gh_maskwords; /* #maskwords used in bloom filter. */
>   u_int32_t gh_shift2; /* Bloom filter shift count. */
> } Elf_GNU_Hash_Header;
> 
> anyone else planning on adding that? there's one place in bionic's
> dynamic linker where we could use this, but i don't think any other
> code cares. (without standard names for these fields though it's hard
> to be sure i searched thoroughly enough.)

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.

> but -- given that i'd have to mess around to make those u_int32_t
> types work anyway -- without someone needing source compatibility, i'm
> leaning towards just keeping this hidden in bionic's copy of the file.

u_int32_t is an obsolete, BSD spelling of uint32_t.  We should fix the
header to use uint32_t and probably evict Elf_GNU_Hash_Header it from
elf_common.h entirely.

-- 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.