Added a dedicated file for handling the OS ABI values.
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
#include "elf_osabi.h"
|
||||
#include <string.h>
|
||||
|
||||
char* ELFOSABISText[19] =
|
||||
{
|
||||
"System V ABI",
|
||||
"Hewlett-Packard HP-UX ABI",
|
||||
"NetBSD ABI",
|
||||
"GNU / Linux ABI",
|
||||
"Reserved ABI",
|
||||
"Reserved ABI",
|
||||
"Sun Solaris ABI",
|
||||
"AIX ABI",
|
||||
"IRIX ABI",
|
||||
"FreeBSd ABI",
|
||||
"Compaq TRU64 UNIX ABI",
|
||||
"Novell Modesto ABI",
|
||||
"OpenBSD ABI",
|
||||
"Open VMS ABI",
|
||||
"Hewlett-Packard Non-Stop Kernel ABI",
|
||||
"Amiga Research OS ABI",
|
||||
"The FenixOS highly scalable multi-core OS ABI",
|
||||
"Nuxi CloudABI ABI",
|
||||
"Stratus Technologies OpenVOS ABI"
|
||||
};
|
||||
|
||||
void GetELFOSABIString(ELFOSABI abi, char buffer[255])
|
||||
{
|
||||
if (!buffer) return;
|
||||
|
||||
memset(buffer, '\0', 255);
|
||||
|
||||
if (abi >= sizeof(ELFOSABISText) / sizeof(char*)) return;
|
||||
|
||||
strncpy(buffer, ELFOSABISText[abi], strlen(ELFOSABISText[abi]));
|
||||
}
|
||||
Reference in New Issue
Block a user