Commit ef9fc1bc authored by Raymond Toy's avatar Raymond Toy

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
......@@ -132,8 +132,15 @@ write_elf_header(int fd)
eh.e_ident[EI_VERSION] = EV_CURRENT;
#ifdef SOLARIS
eh.e_ident[EI_OSABI] = ELFOSABI_SOLARIS;
#else
#elif defined(__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
#ifdef SOLARIS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment