NetBSD-Bugs archive

[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



>Number:         51238
>Category:       toolchain
>Synopsis:       ELF binaries don't carry ELFOSABI_NETBSD in their header
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 13 15:40:00 +0000 2016
>Originator:     Ralf Nolden
>Release:        7.0
>Organization:
KDE
>Environment:
NetBSD 7.0 amd64
>Description:
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.
>How-To-Repeat:
readelf -h /usr/bin/info
>Fix:



Home | Main Index | Thread Index | Old Index