[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/51238: ELF binaries don't carry ELFOSABI_NETBSD in their header
>Synopsis: ELF binaries don't carry ELFOSABI_NETBSD in their header
>Arrival-Date: Mon Jun 13 15:40:00 +0000 2016
>Originator: Ralf Nolden
NetBSD 7.0 amd64
According to http://netbsd.gw.com/cgi-bin/man-cgi?elf+5 the
ELFOSABI_NETBSD is defined but not used:
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.
However, a lot of binary programs that inspect elf binaries use the header instead of inspecting PT_NOTE. Unfortunately, those programs will detect NetBSD binaries as UNIX binaries and depending on their logic will use some default value like Linux as the OS the binary is built for, such as Qt Creator.
It should be considered using the define, even if NetBSD isn't deviate from the standard. The binary information in the header serves the purpose to find out on which platform the binary was built.
readelf -h /usr/bin/info
Main Index |
Thread Index |