[PATCH] libebl: Do not require EI_OSABI for IFUNC.
Martin Liška
mliska@suse.cz
Fri Nov 25 13:06:00 GMT 2022
On 11/24/22 13:33, Mark Wielaard wrote:
> Hi Martin,
>
> On Thu, 2022-11-24 at 13:23 +0100, Martin Liška wrote:
>> Similar fix to:
>> https://sourceware.org/bugzilla/show_bug.cgi?id=29718
>>
>> Ready for master?
>
> Assuming runtime, glibc/ld.so, accepts this without EI_OSABI set to
> ELFOSABI_LINUX, it seems ok to print it as GNU_IFUNC.
>
>> else if (symbol == STT_GNU_IFUNC
>> && ebl != NULL
>> - && (ident = elf_getident (ebl->elf, NULL)) != NULL
>> - && ident[EI_OSABI] == ELFOSABI_LINUX)
>> - return "GNU_IFUNC";
>> + && (ident = elf_getident (ebl->elf, NULL)) != NULL)
>> + return "GNU_IFUNC"; /* Ignore EI_OSABI
>> + as STT_GNU_IFUNC is a reserved name. */
>
> Note that you technically also don't need the elf_getident call
> anymore, except as sanity check that the ELF header can be read
> properly.
>
> OK, with and without that change.
Sorry, I decided to scratch this as it violates the standard:
https://sourceware.org/bugzilla/show_bug.cgi?id=29718#c6
Cheers,
Martin
>
> Cheers,
>
> Mark
More information about the Elfutils-devel
mailing list