Skip to content
Snippets Groups Projects
Commit ef9fc1bc authored by Raymond Toy's avatar Raymond Toy
Browse files

Minor tweak to put use the right EI_OSABI value

Previously, the EI_OSABI value was either ELFOSAB_SOLARIS for solaris
or ELFOSABI_FREEBSD for everything else.  Let's update this to include
NetBSD and Linux.  Unlikely we'll ever support other things like
HP-UX, AIX, IRIX, Tru64, etc.

The value currently doesn't seem matter, but it seems nice to get it
right.
parent 3593ca90
No related branches found
No related tags found
No related merge requests found
...@@ -132,8 +132,15 @@ write_elf_header(int fd) ...@@ -132,8 +132,15 @@ write_elf_header(int fd)
eh.e_ident[EI_VERSION] = EV_CURRENT; eh.e_ident[EI_VERSION] = EV_CURRENT;
#ifdef SOLARIS #ifdef SOLARIS
eh.e_ident[EI_OSABI] = ELFOSABI_SOLARIS; eh.e_ident[EI_OSABI] = ELFOSABI_SOLARIS;
#else #elif defined(__FREEBSD__)
eh.e_ident[EI_OSABI] = ELFOSABI_FREEBSD; eh.e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
#elif defined(__NetBSD__)
eh.e_ident[EI_OSABI] = ELFOSABI_NETBSD;
#elif defined(__linux__)
eh.e_ident[EI_OSABI] = ELFOSABI_LINUX;
#else
/* Default to NONE */
eh.e_ident[EI_OSABI] = ELFOSABI_NONE;
#endif #endif
#ifdef SOLARIS #ifdef SOLARIS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment