Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ELF e_ident[EI_OSABI] not being set on objects?
> On Jan 8, 2025, at 7:46 AM, Joseph Koshy <jkoshy%NetBSD.org@localhost> wrote:
>
> I noticed that NetBSD/evbarm binaries are being built as 'SysV' binaries.
>
> nbarm% readelf -h /usr/bin/nm | grep OS/ABI
> OS/ABI: UNIX - System V
> nbarm% readelf -h /usr/lib/libc.so | grep OS/ABI
> OS/ABI: UNIX - System V
>
> This was on recent -current:
>
> % uname -a
> NetBSD nbarm 10.99.12 NetBSD 10.99.12 (GENERIC64) #0: Fri Dec 27
> 00:57:53 UTC 2024
> mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/evbarm/compile/GENERIC64
> evbarm
>
> Any idea why the e_ident[EI_OSABI] field isn't being set to ELFOSABI_NETBSD?
I believe that is intentional. Running the same command on NetBSD/amd64
gives the same output.
Running "man 5 elf" shows
EI_OSABI Contains the operating system ABI identifica-
tion. Note that even though the definition
ELFOSABI_NETBSD exists, NetBSD uses
ELFOSABI_SYSV here, since the NetBSD ABI does
not deviate from the standard.
The ELF binary can contain an ELF PT_NOTE to show that it's meant for NetBSD. See
https://www.netbsd.org/docs/kernel/elf-notes.html
> Thanks,
> Joseph Koshy
Home |
Main Index |
Thread Index |
Old Index