summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorab196087 <none@none>2006-09-26 11:07:28 -0700
committerab196087 <none@none>2006-09-26 11:07:28 -0700
commit1638af81f0b976a8a9b6936111b901c225d1e4ec (patch)
treef40f5f1de85288b4af1118a3e69eaeaa2be58f50
parent1820c2cdeedc449ce7dce1385b52fd852ad23b77 (diff)
downloadillumos-joyent-1638af81f0b976a8a9b6936111b901c225d1e4ec.tar.gz
6448719 sys/elf.h could be updated with additional machine and ABI types
-rw-r--r--usr/src/cmd/file/file.c2
-rw-r--r--usr/src/cmd/sgs/libconv/common/elf.c16
-rw-r--r--usr/src/cmd/sgs/libconv/common/elf.msg9
-rw-r--r--usr/src/cmd/sgs/packages/common/SUNWonld-README1
-rw-r--r--usr/src/uts/common/sys/elf.h17
5 files changed, 29 insertions, 16 deletions
diff --git a/usr/src/cmd/file/file.c b/usr/src/cmd/file/file.c
index 00586ef970..59f4e44722 100644
--- a/usr/src/cmd/file/file.c
+++ b/usr/src/cmd/file/file.c
@@ -1008,7 +1008,7 @@ print_elf_machine(int machine)
"i960", /* 19 - EM_960 */
"PowerPC", /* 20 - EM_PPC */
"PowerPC64", /* 21 - EM_PPC64 */
- NULL, /* 22 - EM_UNKNOWN22 */
+ "S/390", /* 22 - EM_S390 */
NULL, /* 23 - EM_UNKNOWN23 */
NULL, /* 24 - EM_UNKNOWN24 */
NULL, /* 25 - EM_UNKNOWN25 */
diff --git a/usr/src/cmd/sgs/libconv/common/elf.c b/usr/src/cmd/sgs/libconv/common/elf.c
index 29dbc4cfae..8cff25240b 100644
--- a/usr/src/cmd/sgs/libconv/common/elf.c
+++ b/usr/src/cmd/sgs/libconv/common/elf.c
@@ -78,11 +78,11 @@ static const Msg machines[EM_NUM] = {
MSG_EM_NONE, MSG_EM_M32, MSG_EM_SPARC,
MSG_EM_386, MSG_EM_68K, MSG_EM_88K,
MSG_EM_486, MSG_EM_860, MSG_EM_MIPS,
- MSG_EM_UNKNOWN9, MSG_EM_MIPS_RS3_LE, MSG_EM_RS6000,
+ MSG_EM_S370, MSG_EM_MIPS_RS3_LE, MSG_EM_RS6000,
MSG_EM_UNKNOWN12, MSG_EM_UNKNOWN13, MSG_EM_UNKNOWN14,
MSG_EM_PA_RISC, MSG_EM_nCUBE, MSG_EM_VPP500,
- MSG_EM_SPARC32PLUS, MSG_EM_UNKNOWN19, MSG_EM_PPC,
- MSG_EM_PPC64, MSG_EM_UNKNOWN22, MSG_EM_UNKNOWN23,
+ MSG_EM_SPARC32PLUS, MSG_EM_960, MSG_EM_PPC,
+ MSG_EM_PPC64, MSG_EM_S390, MSG_EM_UNKNOWN23,
MSG_EM_UNKNOWN24, MSG_EM_UNKNOWN25, MSG_EM_UNKNOWN26,
MSG_EM_UNKNOWN27, MSG_EM_UNKNOWN28, MSG_EM_UNKNOWN29,
MSG_EM_UNKNOWN30, MSG_EM_UNKNOWN31, MSG_EM_UNKNOWN32,
@@ -96,7 +96,7 @@ static const Msg machines[EM_NUM] = {
MSG_EM_MMA, MSG_EM_PCP, MSG_EM_NCPU,
MSG_EM_NDR1, MSG_EM_STARCORE, MSG_EM_ME16,
MSG_EM_ST100, MSG_EM_TINYJ, MSG_EM_AMD64,
- MSG_EM_UNKNOWN63, MSG_EM_UNKNOWN64, MSG_EM_UNKNOWN65,
+ MSG_EM_PDSP, MSG_EM_UNKNOWN64, MSG_EM_UNKNOWN65,
MSG_EM_FX66, MSG_EM_ST9PLUS, MSG_EM_ST7,
MSG_EM_68HC16, MSG_EM_68HC11, MSG_EM_68HC08,
MSG_EM_68HC05, MSG_EM_SVX, MSG_EM_ST19,
@@ -112,11 +112,11 @@ static const Msg machines_alt[EM_NUM] = {
MSG_EM_NONE_ALT, MSG_EM_M32_ALT, MSG_EM_SPARC_ALT,
MSG_EM_386_ALT, MSG_EM_68K_ALT, MSG_EM_88K_ALT,
MSG_EM_486_ALT, MSG_EM_860_ALT, MSG_EM_MIPS_ALT,
- MSG_EM_UNKNOWN9, MSG_EM_MIPS_RS3_LE_ALT, MSG_EM_RS6000_ALT,
+ MSG_EM_S370, MSG_EM_MIPS_RS3_LE_ALT, MSG_EM_RS6000_ALT,
MSG_EM_UNKNOWN12, MSG_EM_UNKNOWN13, MSG_EM_UNKNOWN14,
MSG_EM_PA_RISC_ALT, MSG_EM_nCUBE_ALT, MSG_EM_VPP500_ALT,
- MSG_EM_SPARC32PLUS_ALT, MSG_EM_UNKNOWN19, MSG_EM_PPC_ALT,
- MSG_EM_PPC64_ALT, MSG_EM_UNKNOWN22, MSG_EM_UNKNOWN23,
+ MSG_EM_SPARC32PLUS_ALT, MSG_EM_960, MSG_EM_PPC_ALT,
+ MSG_EM_PPC64_ALT, MSG_EM_S390, MSG_EM_UNKNOWN23,
MSG_EM_UNKNOWN24, MSG_EM_UNKNOWN25, MSG_EM_UNKNOWN26,
MSG_EM_UNKNOWN27, MSG_EM_UNKNOWN28, MSG_EM_UNKNOWN29,
MSG_EM_UNKNOWN30, MSG_EM_UNKNOWN31, MSG_EM_UNKNOWN32,
@@ -130,7 +130,7 @@ static const Msg machines_alt[EM_NUM] = {
MSG_EM_MMA, MSG_EM_PCP, MSG_EM_NCPU,
MSG_EM_NDR1, MSG_EM_STARCORE, MSG_EM_ME16,
MSG_EM_ST100, MSG_EM_TINYJ, MSG_EM_AMD64_ALT,
- MSG_EM_UNKNOWN63, MSG_EM_UNKNOWN64, MSG_EM_UNKNOWN65,
+ MSG_EM_PDSP, MSG_EM_UNKNOWN64, MSG_EM_UNKNOWN65,
MSG_EM_FX66, MSG_EM_ST9PLUS, MSG_EM_ST7,
MSG_EM_68HC16, MSG_EM_68HC11, MSG_EM_68HC08,
MSG_EM_68HC05, MSG_EM_SVX, MSG_EM_ST19,
diff --git a/usr/src/cmd/sgs/libconv/common/elf.msg b/usr/src/cmd/sgs/libconv/common/elf.msg
index eff14e2013..be63dc4fa4 100644
--- a/usr/src/cmd/sgs/libconv/common/elf.msg
+++ b/usr/src/cmd/sgs/libconv/common/elf.msg
@@ -60,7 +60,7 @@
@ MSG_EM_860_ALT "i860"
@ MSG_EM_MIPS "EM_MIPS" # 8
@ MSG_EM_MIPS_ALT "RS3000_BE"
-@ MSG_EM_UNKNOWN9 "EM_UNKNOWN9" # 9
+@ MSG_EM_S370 "EM_S370" # 9
@ MSG_EM_MIPS_RS3_LE "EM_MIPS_RS3_LE" # 10
@ MSG_EM_MIPS_RS3_LE_ALT "RS3000_LE"
@ MSG_EM_RS6000 "EM_RS6000" # 11
@@ -76,13 +76,12 @@
@ MSG_EM_VPP500_ALT "VPP500"
@ MSG_EM_SPARC32PLUS "EM_SPARC32PLUS" # 18
@ MSG_EM_SPARC32PLUS_ALT "SPARC32PLUS"
-@ MSG_EM_UNKNOWN19 "EM_UNKNOWN19" # 19
-@ MSG_EM_UNKNOWN19 "EM_UNKNOWN19" # 19
+@ MSG_EM_960 "EM_960" # 19
@ MSG_EM_PPC "EM_PPC" # 20
@ MSG_EM_PPC_ALT "PowerPC"
@ MSG_EM_PPC64 "EM_PPC64" #21
@ MSG_EM_PPC64_ALT "PowerPC64"
-@ MSG_EM_UNKNOWN22 "EM_UNKNOWN22" #22
+@ MSG_EM_S390 "EM_S390" #22
@ MSG_EM_UNKNOWN23 "EM_UNKNOWN23" #23
@ MSG_EM_UNKNOWN24 "EM_UNKNOWN24" #24
@ MSG_EM_UNKNOWN25 "EM_UNKNOWN25" #25
@@ -128,7 +127,7 @@
@ MSG_EM_TINYJ "EM_TINYJ" #61
@ MSG_EM_AMD64 "EM_AMD64" #62
@ MSG_EM_AMD64_ALT "AMD64"
-@ MSG_EM_UNKNOWN63 "EM_UNKNOWN63" #63
+@ MSG_EM_PDSP "EM_PDSP" #63
@ MSG_EM_UNKNOWN64 "EM_UNKNOWN64" #64
@ MSG_EM_UNKNOWN65 "EM_UNKNOWN65" #65
@ MSG_EM_FX66 "EM_FX66" #66
diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README
index 95891f1c82..1ae4a523f4 100644
--- a/usr/src/cmd/sgs/packages/common/SUNWonld-README
+++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README
@@ -1130,3 +1130,4 @@ Bugid Risk Synopsis
6423746 add an option to relax the resolution of COMDAT relocs (D)
4934427 runtime linker should load up static symbol names visible to
dladdr() (D)
+6448719 sys/elf.h could be updated with additional machine and ABI types
diff --git a/usr/src/uts/common/sys/elf.h b/usr/src/uts/common/sys/elf.h
index 3e93d63b1a..5132847773 100644
--- a/usr/src/uts/common/sys/elf.h
+++ b/usr/src/uts/common/sys/elf.h
@@ -162,13 +162,15 @@ typedef struct {
#define EM_UNKNOWN13 13
#define EM_UNKNOWN14 14
#define EM_PA_RISC 15 /* PA-RISC */
+#define EM_PARISC EM_PA_RISC /* Alias: GNU compatibility */
#define EM_nCUBE 16 /* nCUBE */
#define EM_VPP500 17 /* Fujitsu VPP500 */
#define EM_SPARC32PLUS 18 /* Sun SPARC 32+ */
#define EM_960 19 /* Intel 80960 */
#define EM_PPC 20 /* PowerPC */
#define EM_PPC64 21 /* 64-bit PowerPC */
-#define EM_UNKNOWN22 22
+#define EM_S390 22 /* IBM System/390 Processor */
+#define EM_UNKNOWN22 EM_S390 /* Alias: Older published name */
#define EM_UNKNOWN23 23
#define EM_UNKNOWN24 24
#define EM_UNKNOWN25 25
@@ -261,6 +263,7 @@ typedef struct {
#define ELFOSABI_NONE 0 /* No extensions or unspecified */
+#define ELFOSABI_SYSV ELFOSABI_NONE
#define ELFOSABI_HPUX 1 /* Hewlett-Packard HP-UX */
#define ELFOSABI_NETBSD 2 /* NetBSD */
#define ELFOSABI_LINUX 3 /* Linux */
@@ -273,7 +276,11 @@ typedef struct {
#define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX */
#define ELFOSABI_MODESTO 11 /* Novell Modesto */
#define ELFOSABI_OPENBSD 12 /* Open BSD */
-
+#define ELFOSABI_OPENVMS 13 /* Open VMS */
+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
+#define ELFOSABI_AROS 15 /* Amiga Research OS */
+#define ELFOSABI_ARM 97 /* ARM */
+#define ELFOSABI_STANDALONE 255 /* standalone (embedded) application */
/*
* Program header
@@ -400,6 +407,7 @@ typedef struct {
#define SHT_SYMTAB_SHNDX 18
#define SHT_NUM 19
+/* Solaris ABI specific values */
#define SHT_LOOS 0x60000000 /* OS specific range */
#define SHT_LOSUNW 0x6ffffff3
#define SHT_SUNW_LDYNSYM 0x6ffffff3
@@ -418,6 +426,11 @@ typedef struct {
#define SHT_HISUNW 0x6fffffff
#define SHT_HIOS 0x6fffffff
+/* GNU/Linux ABI specific values */
+#define SHT_GNU_verdef 0x6ffffffd
+#define SHT_GNU_verneed 0x6ffffffe
+#define SHT_GNU_versym 0x6fffffff
+
#define SHT_LOPROC 0x70000000 /* processor specific range */
#define SHT_HIPROC 0x7fffffff