namespace llvm {
namespace object {
-constexpr int NumElfSymbolTypes = 8;
+constexpr int NumElfSymbolTypes = 16;
extern const llvm::EnumEntry<unsigned> ElfSymbolTypes[NumElfSymbolTypes];
class elf_symbol_iterator;
{"File", "FILE", ELF::STT_FILE},
{"Common", "COMMON", ELF::STT_COMMON},
{"TLS", "TLS", ELF::STT_TLS},
- {"GNU_IFunc", "IFUNC", ELF::STT_GNU_IFUNC}};
+ {"Unknown", "<unknown>: 7", 7},
+ {"Unknown", "<unknown>: 8", 8},
+ {"Unknown", "<unknown>: 9", 9},
+ {"GNU_IFunc", "IFUNC", ELF::STT_GNU_IFUNC},
+ {"OS Specific", "<OS specific>: 11", 11},
+ {"OS Specific", "<OS specific>: 12", 12},
+ {"Proc Specific", "<processor specific>: 13", 13},
+ {"Proc Specific", "<processor specific>: 14", 14},
+ {"Proc Specific", "<processor specific>: 15", 15}
+};
ELFObjectFileBase::ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source)
: ObjectFile(Type, Source) {}
Type: STT_OBJECT
- Name: symbol_func
Type: STT_FUNC
+ - Name: unknown_7
+ Type: 7
+ - Name: unknown_8
+ Type: 8
+ - Name: unknown_9
+ Type: 9
- Name: symbol_ifunc
Type: STT_GNU_IFUNC
- - Name: os_specific
+ - Name: os_specific_10
+ Type: 10
+ - Name: os_specific_11
Type: 11
- - Name: proc_specific
+ - Name: os_specific_12
+ Type: 12
+ - Name: proc_specific_13
Type: 13
- - Name: unknown
- Type: 7
-
-## FIXME: Should not print blank types for unknown, OS-specific and processor-
-## specific types. See https://bugs.llvm.org/show_bug.cgi?id=41713.
+ - Name: proc_specific_14
+ Type: 14
+ - Name: proc_specific_15
+ Type: 15
-# CHECK: os_specific {{.*}}| | | |*UND*
-# CHECK-NEXT: proc_specific {{.*}}| | | |*UND*
-# CHECK-NEXT: symbol_common {{.*}}| COMMON| | |*COM*
-# CHECK-NEXT: symbol_file {{.*}}| FILE| | |*UND*
-# CHECK-NEXT: symbol_func {{.*}}| FUNC| | |*UND*
-# CHECK-NEXT: symbol_ifunc {{.*}}| IFUNC| | |*UND*
-# CHECK-NEXT: symbol_notype {{.*}}| NOTYPE| | |*UND*
-# CHECK-NEXT: symbol_obj {{.*}}| OBJECT| | |*UND*
-# CHECK-NEXT: symbol_tls {{.*}}| TLS| | |*UND*
-# CHECK-NEXT: unknown {{.*}}| | | |*UND*
+# CHECK: os_specific_10 | | U | IFUNC| | |*UND*
+# CHECK-NEXT: os_specific_11 | | U | <OS specific>: 11| | |*UND*
+# CHECK-NEXT: os_specific_12 | | U | <OS specific>: 12| | |*UND*
+# CHECK-NEXT: proc_specific_13 | | U |<processor specific>: 13| | |*UND*
+# CHECK-NEXT: proc_specific_14 | | U |<processor specific>: 14| | |*UND*
+# CHECK-NEXT: proc_specific_15 | | U |<processor specific>: 15| | |*UND*
+# CHECK-NEXT: symbol_common | | U | COMMON| | |*COM*
+# CHECK-NEXT: symbol_file | | U | FILE| | |*UND*
+# CHECK-NEXT: symbol_func | | U | FUNC| | |*UND*
+# CHECK-NEXT: symbol_ifunc | | U | IFUNC| | |*UND*
+# CHECK-NEXT: symbol_notype | | U | NOTYPE| | |*UND*
+# CHECK-NEXT: symbol_obj | | U | OBJECT| | |*UND*
+# CHECK-NEXT: symbol_tls | | U | TLS| | |*UND*
+# CHECK-NEXT: unknown_7 | | U | <unknown>: 7| | |*UND*
+# CHECK-NEXT: unknown_8 | | U | <unknown>: 8| | |*UND*
+# CHECK-NEXT: unknown_9 | | U | <unknown>: 9| | |*UND*
# LLVM: Type: TLS
# LLVM: Name: gnu_ifunc
# LLVM: Type: GNU_IFunc
-# LLVM: Name: os_specific
-# LLVM: Type: 0xB
-# LLVM: Name: proc_specific
-# LLVM: Type: 0xD
-# LLVM: Name: unknown
-# LLVM: Type: 0x7
+
+# LLVM: Name: os_specific_11
+# LLVM: Type: OS Specific (0xB)
+# LLVM: Name: os_specific_12
+# LLVM: Type: OS Specific (0xC)
+
+# LLVM: Name: proc_specific_13
+# LLVM: Type: Proc Specific (0xD)
+# LLVM: Name: proc_specific_14
+# LLVM: Type: Proc Specific (0xE)
+# LLVM: Name: proc_specific_15
+# LLVM: Type: Proc Specific (0xF)
+
+# LLVM: Name: unknown_7
+# LLVM: Type: Unknown (0x7)
+# LLVM: Name: unknown_8
+# LLVM: Type: Unknown (0x8)
+# LLVM: Name: unknown_9
+# LLVM: Type: Unknown (0x9)
# GNU: NOTYPE {{.*}} notype
# GNU: OBJECT {{.*}} object
# GNU: COMMON {{.*}} common
# GNU: TLS {{.*}} tls
# GNU: IFUNC {{.*}} gnu_ifunc
-# GNU: b {{.*}} os_specific
-# GNU: d {{.*}} proc_specific
-# GNU: 7 {{.*}} unknown
+# GNU: <OS specific>: 11 {{.*}} os_specific_11
+# GNU: <OS specific>: 12 {{.*}} os_specific_12
+# GNU: <processor specific>: 13 {{.*}} proc_specific_13
+# GNU: <processor specific>: 14 {{.*}} proc_specific_14
+# GNU: <processor specific>: 15 {{.*}} proc_specific_15
+# GNU: <unknown>: 7 {{.*}} unknown_7
+# GNU: <unknown>: 8 {{.*}} unknown_8
+# GNU: <unknown>: 9 {{.*}} unknown_9
!ELF
FileHeader:
- Name: gnu_ifunc
Type: STT_GNU_IFUNC
Binding: STB_GLOBAL
- - Name: os_specific
+ - Name: os_specific_11
Type: 11
Binding: STB_GLOBAL
- - Name: proc_specific
+ - Name: os_specific_12
+ Type: 12
+ Binding: STB_GLOBAL
+ - Name: proc_specific_13
Type: 13
Binding: STB_GLOBAL
- - Name: unknown
+ - Name: proc_specific_14
+ Type: 14
+ Binding: STB_GLOBAL
+ - Name: proc_specific_15
+ Type: 15
+ Binding: STB_GLOBAL
+ - Name: unknown_7
Type: 7
Binding: STB_GLOBAL
+ - Name: unknown_8
+ Type: 8
+ Binding: STB_GLOBAL
+ - Name: unknown_9
+ Type: 9
+ Binding: STB_GLOBAL
# CHECK: Type: Section
# CHECK: Name: known_hex
# CHECK: Type: Object
-# CHECK: Name: unknown_hex
-# CHECK: Type: 0xB
+
+# CHECK: Name: unknown_hex_11
+# CHECK: Type: OS Specific (0xB)
+
# CHECK: Name: known_int
# CHECK: Type: Object
# CHECK: Name: unknown_int
-# CHECK: Type: 0xB
+# CHECK: Type: OS Specific (0xB)
!ELF
FileHeader:
- Name: known_hex
Type: 0x1
Binding: STB_GLOBAL
- - Name: unknown_hex
+ - Name: unknown_hex_11
Type: 0xb
Binding: STB_GLOBAL
- Name: known_int