mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
ELFObjectWriter: Don't sort non-local symbols
As we don't sort local symbols, don't sort non-local symbols. This makes non-local symbols appear in their register order, which matches GNU as. The register order is nice in that you can write tests with interleaved CHECK prefixes, e.g. ``` // CHECK: something about foo .globl foo foo: // CHECK: something about bar .globl bar bar: ``` With the lexicographical order, the user needs to place lexicographical smallest symbol first or keep CHECK prefixes in one place.
This commit is contained in:
parent
17f939474e
commit
d33006d182
@ -724,9 +724,6 @@ void ELFWriter::computeSymbolTable(
|
||||
|
||||
StrTabBuilder.finalize();
|
||||
|
||||
// Symbols are required to be in lexicographic order.
|
||||
array_pod_sort(ExternalSymbolData.begin(), ExternalSymbolData.end());
|
||||
|
||||
// Make the first STT_FILE precede previous local symbols.
|
||||
unsigned Index = 1;
|
||||
auto FileNameIt = FileNames.begin();
|
||||
|
@ -12,9 +12,9 @@
|
||||
; ELF-NEXT: ]
|
||||
|
||||
; ELF: Symbol {
|
||||
; ELF: Name: lds.defined
|
||||
; ELF-NEXT: Value: 0x8
|
||||
; ELF-NEXT: Size: 32
|
||||
; ELF: Name: lds.external
|
||||
; ELF-NEXT: Value: 0x4
|
||||
; ELF-NEXT: Size: 0
|
||||
; ELF-NEXT: Binding: Global (0x1)
|
||||
; ELF-NEXT: Type: Object (0x1)
|
||||
; ELF-NEXT: Other: 0
|
||||
@ -22,9 +22,9 @@
|
||||
; ELF-NEXT: }
|
||||
|
||||
; ELF: Symbol {
|
||||
; ELF: Name: lds.external
|
||||
; ELF-NEXT: Value: 0x4
|
||||
; ELF-NEXT: Size: 0
|
||||
; ELF: Name: lds.defined
|
||||
; ELF-NEXT: Value: 0x8
|
||||
; ELF-NEXT: Size: 32
|
||||
; ELF-NEXT: Binding: Global (0x1)
|
||||
; ELF-NEXT: Type: Object (0x1)
|
||||
; ELF-NEXT: Other: 0
|
||||
|
@ -21,9 +21,9 @@
|
||||
|
||||
; Check that 'barAlias' and 'varAlias' produced as undefined.
|
||||
; RUN: llvm-readelf --symbols %t2.o.1 | FileCheck %s --check-prefix=SYMBOLS
|
||||
; SYMBOLS: FUNC GLOBAL DEFAULT 2 zed
|
||||
; SYMBOLS: NOTYPE GLOBAL DEFAULT UND barAlias
|
||||
; SYMBOLS: NOTYPE GLOBAL DEFAULT UND varAlias
|
||||
; SYMBOLS: FUNC GLOBAL DEFAULT 2 zed
|
||||
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
@ -17,9 +17,9 @@
|
||||
; RUN: llvm-readelf --symbols %t3.o.1 | FileCheck %s --check-prefix=SYMBOLS
|
||||
|
||||
; Check that 'foo' and 'bar' produced as undefined.
|
||||
; SYMBOLS: NOTYPE GLOBAL DEFAULT UND bar
|
||||
; SYMBOLS: NOTYPE GLOBAL DEFAULT UND foo
|
||||
; SYMBOLS: FUNC GLOBAL DEFAULT 2 zed
|
||||
; SYMBOLS: NOTYPE GLOBAL DEFAULT UND foo
|
||||
; SYMBOLS: NOTYPE GLOBAL DEFAULT UND bar
|
||||
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
@ -34,7 +34,7 @@ aarch64_size:
|
||||
// SYMS: Type Bind Vis Ndx Name
|
||||
// SYMS: NOTYPE LOCAL DEFAULT 3 $d.0
|
||||
// SYMS-NEXT: FUNC GLOBAL DEFAULT 3 aarch64_size
|
||||
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND also_double_word
|
||||
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND double_word
|
||||
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND full_word
|
||||
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND half_word
|
||||
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND full_word
|
||||
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND double_word
|
||||
// SYMS-NEXT: NOTYPE GLOBAL DEFAULT UND also_double_word
|
||||
|
@ -49,6 +49,16 @@ test_kernel:
|
||||
// CHECK-NEXT: Section: Processor Specific (0xFF00)
|
||||
// CHECK-NEXT: }
|
||||
|
||||
// CHECK: Symbol {
|
||||
// CHECK: Name: lds4 (39)
|
||||
// CHECK-NEXT: Value: 0x4
|
||||
// CHECK-NEXT: Size: 0
|
||||
// CHECK-NEXT: Binding: Global (0x1)
|
||||
// CHECK-NEXT: Type: Object (0x1)
|
||||
// CHECK-NEXT: Other: 0
|
||||
// CHECK-NEXT: Section: Processor Specific (0xFF00)
|
||||
// CHECK-NEXT: }
|
||||
|
||||
// CHECK: Symbol {
|
||||
// CHECK: Name: lds1 (49)
|
||||
// CHECK-NEXT: Value: 0x8
|
||||
@ -70,13 +80,3 @@ test_kernel:
|
||||
// CHECK-NEXT: }
|
||||
|
||||
// CHECK-NOT: Name: lds3
|
||||
|
||||
// CHECK: Symbol {
|
||||
// CHECK: Name: lds4 (39)
|
||||
// CHECK-NEXT: Value: 0x4
|
||||
// CHECK-NEXT: Size: 0
|
||||
// CHECK-NEXT: Binding: Global (0x1)
|
||||
// CHECK-NEXT: Type: Object (0x1)
|
||||
// CHECK-NEXT: Other: 0
|
||||
// CHECK-NEXT: Section: Processor Specific (0xFF00)
|
||||
// CHECK-NEXT: }
|
||||
|
@ -88,6 +88,15 @@ global1:
|
||||
@ CHECK-NEXT: Section: .text
|
||||
@ CHECK-NEXT: }
|
||||
@ CHECK-NEXT: Symbol {
|
||||
@ CHECK-NEXT: Name: global1
|
||||
@ CHECK-NEXT: Value: 0x14
|
||||
@ CHECK-NEXT: Size: 0
|
||||
@ CHECK-NEXT: Binding: Global (0x1)
|
||||
@ CHECK-NEXT: Type: None (0x0)
|
||||
@ CHECK-NEXT: Other: 0
|
||||
@ CHECK-NEXT: Section: .text
|
||||
@ CHECK-NEXT: }
|
||||
@ CHECK-NEXT: Symbol {
|
||||
@ CHECK-NEXT: Name: bar2@zed
|
||||
@ CHECK-NEXT: Value: 0x0
|
||||
@ CHECK-NEXT: Size: 0
|
||||
@ -114,13 +123,4 @@ global1:
|
||||
@ CHECK-NEXT: Other: 0
|
||||
@ CHECK-NEXT: Section: .text
|
||||
@ CHECK-NEXT: }
|
||||
@ CHECK-NEXT: Symbol {
|
||||
@ CHECK-NEXT: Name: global1
|
||||
@ CHECK-NEXT: Value: 0x14
|
||||
@ CHECK-NEXT: Size: 0
|
||||
@ CHECK-NEXT: Binding: Global (0x1)
|
||||
@ CHECK-NEXT: Type: None (0x0)
|
||||
@ CHECK-NEXT: Other: 0
|
||||
@ CHECK-NEXT: Section: .text
|
||||
@ CHECK-NEXT: }
|
||||
@ CHECK-NEXT: ]
|
||||
|
@ -18,6 +18,13 @@ bar = foo
|
||||
baz = foo + 2
|
||||
|
||||
@@ make sure foo and bar are thumb function: bit 0 = 1 (st_value)
|
||||
@CHECK: Symbol {
|
||||
@CHECK: Name: foo
|
||||
@CHECK-NEXT: Value: 0x1
|
||||
@CHECK-NEXT: Size: 0
|
||||
@CHECK-NEXT: Binding: Global
|
||||
@CHECK-NEXT: Type: Function
|
||||
|
||||
@CHECK: Symbol {
|
||||
@CHECK: Name: bar
|
||||
@CHECK-NEXT: Value: 0x1
|
||||
@ -31,10 +38,3 @@ baz = foo + 2
|
||||
@CHECK-NEXT: Size: 0
|
||||
@CHECK-NEXT: Binding: Global
|
||||
@CHECK-NEXT: Type: Function
|
||||
|
||||
@CHECK: Symbol {
|
||||
@CHECK: Name: foo
|
||||
@CHECK-NEXT: Value: 0x1
|
||||
@CHECK-NEXT: Size: 0
|
||||
@CHECK-NEXT: Binding: Global
|
||||
@CHECK-NEXT: Type: Function
|
||||
|
@ -326,14 +326,26 @@ p:
|
||||
//CHECK: Section: my_bss.2 (0x12)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: a
|
||||
//CHECK: Section: my_bss.1 (0xE)
|
||||
//CHECK: Name: foo
|
||||
//CHECK: Section: my_text.1 (0x4)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: b
|
||||
//CHECK: Section: my_data.1 (0xF)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: goo
|
||||
//CHECK: Section: my_text.2 (0x8)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: hoo
|
||||
//CHECK: Section: .text (0x2)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: a
|
||||
//CHECK: Section: my_bss.1 (0xE)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: c
|
||||
//CHECK: Section: my_bss.1 (0xE)
|
||||
//CHECK: }
|
||||
@ -350,22 +362,10 @@ p:
|
||||
//CHECK: Section: my_rodata.1 (0x10)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: foo
|
||||
//CHECK: Section: my_text.1 (0x4)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: goo
|
||||
//CHECK: Section: my_text.2 (0x8)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: h
|
||||
//CHECK: Section: .bss (0x11)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: hoo
|
||||
//CHECK: Section: .text (0x2)
|
||||
//CHECK: }
|
||||
//CHECK: Symbol {
|
||||
//CHECK: Name: i
|
||||
//CHECK: Section: my_bss.2 (0x12)
|
||||
//CHECK: }
|
||||
|
@ -28,8 +28,8 @@ late3:
|
||||
# CHECK-NEXT: EntrySize: 16
|
||||
# CHECK-NEXT: SectionData (
|
||||
# CHECK-NEXT: 0000: 02000000 05000000 20000000 00000000
|
||||
# CHECK-NEXT: 0010: 06000000 02000000 0B000000 00000000
|
||||
# CHECK-NEXT: 0020: 07000000 03000000 14000000 00000000
|
||||
# CHECK-NEXT: 0010: 07000000 02000000 0B000000 00000000
|
||||
# CHECK-NEXT: 0020: 06000000 03000000 14000000 00000000
|
||||
# CHECK-NEXT: 0030: 01000000 05000000 2A000000 00000000
|
||||
# CHECK-NEXT: )
|
||||
|
||||
@ -62,13 +62,6 @@ late3:
|
||||
# CHECK-NEXT: Type:
|
||||
# CHECK-NEXT: Other:
|
||||
# CHECK-NEXT: Section: Undefined
|
||||
# CHECK: Name: freq
|
||||
# CHECK-NEXT: Value:
|
||||
# CHECK-NEXT: Size:
|
||||
# CHECK-NEXT: Binding: Weak
|
||||
# CHECK-NEXT: Type:
|
||||
# CHECK-NEXT: Other:
|
||||
# CHECK-NEXT: Section: Undefined
|
||||
# CHECK: Name: late
|
||||
# CHECK-NEXT: Value:
|
||||
# CHECK-NEXT: Size:
|
||||
@ -76,6 +69,13 @@ late3:
|
||||
# CHECK-NEXT: Type:
|
||||
# CHECK-NEXT: Other:
|
||||
# CHECK-NEXT: Section: .test
|
||||
# CHECK: Name: freq
|
||||
# CHECK-NEXT: Value:
|
||||
# CHECK-NEXT: Size:
|
||||
# CHECK-NEXT: Binding: Weak
|
||||
# CHECK-NEXT: Type:
|
||||
# CHECK-NEXT: Other:
|
||||
# CHECK-NEXT: Section: Undefined
|
||||
# CHECK: CGProfile [
|
||||
# CHECK-NEXT: CGProfileEntry {
|
||||
# CHECK-NEXT: From: a
|
||||
|
@ -11,8 +11,8 @@
|
||||
# CHECK-NEXT: 8: 0000000000000000 0 SECTION LOCAL DEFAULT 8 bar1
|
||||
# CHECK-NEXT: 9: 0000000000000000 0 NOTYPE LOCAL DEFAULT 8 local2
|
||||
# CHECK-NEXT: 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS bar.c
|
||||
# CHECK-NEXT: 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 6 bar.c
|
||||
# CHECK-NEXT: 12: 0000000000000008 0 NOTYPE GLOBAL DEFAULT 2 foo.c
|
||||
# CHECK-NEXT: 11: 0000000000000008 0 NOTYPE GLOBAL DEFAULT 2 foo.c
|
||||
# CHECK-NEXT: 12: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 6 bar.c
|
||||
|
||||
.quad .text
|
||||
|
||||
|
@ -8,7 +8,7 @@ mov %eax,bar
|
||||
|
||||
|
||||
// CHECK: Symbol {
|
||||
// CHECK: Name: bar
|
||||
// CHECK: Name: foo
|
||||
// CHECK-NEXT: Value: 0x0
|
||||
// CHECK-NEXT: Size: 0
|
||||
// CHECK-NEXT: Binding: Global
|
||||
@ -17,7 +17,7 @@ mov %eax,bar
|
||||
// CHECK-NEXT: Section: Undefined (0x0)
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: Symbol {
|
||||
// CHECK-NEXT: Name: foo
|
||||
// CHECK-NEXT: Name: bar
|
||||
// CHECK-NEXT: Value: 0x0
|
||||
// CHECK-NEXT: Size: 0
|
||||
// CHECK-NEXT: Binding: Global
|
||||
|
@ -50,6 +50,6 @@ call memcpy_plus_1@PLT
|
||||
# SYM-NEXT: NOTYPE LOCAL DEFAULT 4 data_alias_l
|
||||
# SYM-NEXT: SECTION LOCAL DEFAULT 4 .data
|
||||
# SYM-NEXT: NOTYPE GLOBAL DEFAULT UND __GI_memcpy
|
||||
# SYM-NEXT: NOTYPE GLOBAL DEFAULT 4 data
|
||||
# SYM-NEXT: NOTYPE GLOBAL DEFAULT 4 data_alias
|
||||
# SYM-NEXT: NOTYPE GLOBAL DEFAULT 4 data
|
||||
# SYM-NOT: {{.}}
|
||||
|
@ -16,6 +16,6 @@ foobar:
|
||||
.Ltmp3:
|
||||
.size foobar, .Ltmp3-foobar
|
||||
|
||||
// CHECK: Name: bar (14)
|
||||
// CHECK: Name: foo (18)
|
||||
// CHECK: Name: foobar (11)
|
||||
// CHECK: Name: foo (18)
|
||||
// CHECK: Name: bar (14)
|
||||
|
@ -1,8 +1,8 @@
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
|
||||
# RUN: llvm-readelf -s %t | FileCheck %s
|
||||
|
||||
# CHECK: NOTYPE GLOBAL HIDDEN {{[1-9]}} def@@v1
|
||||
# CHECK-NEXT: NOTYPE GLOBAL PROTECTED UND undef@v1
|
||||
# CHECK: NOTYPE GLOBAL PROTECTED UND undef@v1
|
||||
# CHECK-NEXT: NOTYPE GLOBAL HIDDEN {{[1-9]}} def@@v1
|
||||
|
||||
.protected undef
|
||||
.symver undef, undef@@@v1
|
||||
|
@ -42,7 +42,7 @@ global1:
|
||||
# SYM-NEXT: 4: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 bar1@zed
|
||||
# SYM-NEXT: 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 bar3@@zed
|
||||
# SYM-NEXT: 6: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 bar5@@zed
|
||||
# SYM-NEXT: 7: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar2@zed
|
||||
# SYM-NEXT: 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar6@zed
|
||||
# SYM-NEXT: 9: 0000000000000014 0 NOTYPE GLOBAL DEFAULT 2 g1@@zed
|
||||
# SYM-NEXT: 10: 0000000000000014 0 NOTYPE GLOBAL DEFAULT 2 global1
|
||||
# SYM-NEXT: 7: 0000000000000014 0 NOTYPE GLOBAL DEFAULT 2 global1
|
||||
# SYM-NEXT: 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar2@zed
|
||||
# SYM-NEXT: 9: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar6@zed
|
||||
# SYM-NEXT: 10: 0000000000000014 0 NOTYPE GLOBAL DEFAULT 2 g1@@zed
|
||||
|
@ -2,40 +2,40 @@
|
||||
|
||||
# CHECK: Symbol table '.symtab' contains 34 entries:
|
||||
# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name
|
||||
# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
# CHECK-NEXT: 1: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 alias1
|
||||
# CHECK-NEXT: 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 alias10
|
||||
# CHECK-NEXT: 3: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 alias11
|
||||
# CHECK-NEXT: 4: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 alias12
|
||||
# CHECK-NEXT: 5: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 alias2
|
||||
# CHECK-NEXT: 6: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 alias3
|
||||
# CHECK-NEXT: 7: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 alias4
|
||||
# CHECK-NEXT: 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 alias5
|
||||
# CHECK-NEXT: 9: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 alias6
|
||||
# CHECK-NEXT: 10: 0000000000000000 0 TLS GLOBAL DEFAULT 2 alias7
|
||||
# CHECK-NEXT: 11: 0000000000000000 0 TLS GLOBAL DEFAULT 2 alias8
|
||||
# CHECK-NEXT: 12: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 alias9
|
||||
# CHECK-NEXT: 13: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 bar
|
||||
# CHECK-NEXT: 14: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 foo
|
||||
# CHECK-NEXT: 15: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 func
|
||||
# CHECK-NEXT: 16: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 ifunc
|
||||
# CHECK-NEXT: 17: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 obj
|
||||
# CHECK-NEXT: 18: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 sym1
|
||||
# CHECK-NEXT: 19: 0000000000000000 0 TLS GLOBAL DEFAULT 2 sym10
|
||||
# CHECK-NEXT: 20: 0000000000000000 0 TLS GLOBAL DEFAULT 2 sym11
|
||||
# CHECK-NEXT: 21: 0000000000000000 0 TLS GLOBAL DEFAULT 2 sym12
|
||||
# CHECK-NEXT: 22: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 sym2
|
||||
# CHECK-NEXT: 23: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 sym3
|
||||
# CHECK-NEXT: 24: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 sym4
|
||||
# CHECK-NEXT: 25: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 sym5
|
||||
# CHECK-NEXT: 26: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 sym6
|
||||
# CHECK-NEXT: 27: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 sym7
|
||||
# CHECK-NEXT: 28: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 sym8
|
||||
# CHECK-NEXT: 29: 0000000000000000 0 TLS GLOBAL DEFAULT 2 sym9
|
||||
# CHECK-NEXT: 30: 0000000000000000 0 TLS GLOBAL DEFAULT 2 tls
|
||||
# CHECK-NEXT: 31: 0000000000000000 0 TLS GLOBAL DEFAULT 2 tls_quoted
|
||||
# CHECK-NEXT: 32: 0000000000000000 0 TLS GLOBAL DEFAULT 2 tls_upper_case
|
||||
# CHECK-NEXT: 33: 0000000000000000 0 OBJECT UNIQUE DEFAULT 2 zed
|
||||
# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
# CHECK-NEXT: 1: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 foo
|
||||
# CHECK-NEXT: 2: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 bar
|
||||
# CHECK-NEXT: 3: 0000000000000000 0 OBJECT UNIQUE DEFAULT 2 zed
|
||||
# CHECK-NEXT: 4: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 obj
|
||||
# CHECK-NEXT: 5: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 func
|
||||
# CHECK-NEXT: 6: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 ifunc
|
||||
# CHECK-NEXT: 7: 0000000000000000 0 TLS GLOBAL DEFAULT 2 tls
|
||||
# CHECK-NEXT: 8: 0000000000000000 0 TLS GLOBAL DEFAULT 2 tls_quoted
|
||||
# CHECK-NEXT: 9: 0000000000000000 0 TLS GLOBAL DEFAULT 2 tls_upper_case
|
||||
# CHECK-NEXT: 10: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 sym1
|
||||
# CHECK-NEXT: 11: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 alias1
|
||||
# CHECK-NEXT: 12: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 sym2
|
||||
# CHECK-NEXT: 13: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 alias2
|
||||
# CHECK-NEXT: 14: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 sym3
|
||||
# CHECK-NEXT: 15: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 alias3
|
||||
# CHECK-NEXT: 16: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 sym4
|
||||
# CHECK-NEXT: 17: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 alias4
|
||||
# CHECK-NEXT: 18: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 sym5
|
||||
# CHECK-NEXT: 19: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 alias5
|
||||
# CHECK-NEXT: 20: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 sym6
|
||||
# CHECK-NEXT: 21: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 alias6
|
||||
# CHECK-NEXT: 22: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 sym7
|
||||
# CHECK-NEXT: 23: 0000000000000000 0 TLS GLOBAL DEFAULT 2 alias7
|
||||
# CHECK-NEXT: 24: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 sym8
|
||||
# CHECK-NEXT: 25: 0000000000000000 0 TLS GLOBAL DEFAULT 2 alias8
|
||||
# CHECK-NEXT: 26: 0000000000000000 0 TLS GLOBAL DEFAULT 2 sym9
|
||||
# CHECK-NEXT: 27: 0000000000000000 0 OBJECT GLOBAL DEFAULT 2 alias9
|
||||
# CHECK-NEXT: 28: 0000000000000000 0 TLS GLOBAL DEFAULT 2 sym10
|
||||
# CHECK-NEXT: 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 alias10
|
||||
# CHECK-NEXT: 30: 0000000000000000 0 TLS GLOBAL DEFAULT 2 sym11
|
||||
# CHECK-NEXT: 31: 0000000000000000 0 IFUNC GLOBAL DEFAULT 2 alias11
|
||||
# CHECK-NEXT: 32: 0000000000000000 0 TLS GLOBAL DEFAULT 2 sym12
|
||||
# CHECK-NEXT: 33: 0000000000000000 0 FUNC GLOBAL DEFAULT 2 alias12
|
||||
|
||||
// Test that both % and @ are accepted.
|
||||
.global foo
|
||||
|
@ -6,8 +6,8 @@
|
||||
# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name
|
||||
# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
# CHECK-NEXT: 1: 0000000000000000 0 NOTYPE LOCAL DEFAULT 4 .Lsym8
|
||||
# CHECK-NEXT: 2: 0000000000000000 0 NOTYPE GLOBAL HIDDEN UND hidden
|
||||
# CHECK-NEXT: 3: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND sym6
|
||||
# CHECK-NEXT: 2: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND sym6
|
||||
# CHECK-NEXT: 3: 0000000000000000 0 NOTYPE GLOBAL HIDDEN UND hidden
|
||||
# CHECK-NEXT: 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND undef
|
||||
|
||||
.Lsym2:
|
||||
|
@ -9,15 +9,6 @@
|
||||
.weak bar
|
||||
bar:
|
||||
|
||||
// CHECK: Symbol {
|
||||
// CHECK: Name: bar
|
||||
// CHECK-NEXT: Value: 0x4
|
||||
// CHECK-NEXT: Size: 0
|
||||
// CHECK-NEXT: Binding: Weak
|
||||
// CHECK-NEXT: Type: None
|
||||
// CHECK-NEXT: Other: 0
|
||||
// CHECK-NEXT: Section: .text
|
||||
// CHECK-NEXT: }
|
||||
// CHECK: Symbol {
|
||||
// CHECK: Name: foo
|
||||
// CHECK-NEXT: Value: 0x0
|
||||
@ -27,4 +18,13 @@ bar:
|
||||
// CHECK-NEXT: Other: 0
|
||||
// CHECK-NEXT: Section: Undefined (0x0)
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: Symbol {
|
||||
// CHECK-NEXT: Name: bar
|
||||
// CHECK-NEXT: Value: 0x4
|
||||
// CHECK-NEXT: Size: 0
|
||||
// CHECK-NEXT: Binding: Weak
|
||||
// CHECK-NEXT: Type: None
|
||||
// CHECK-NEXT: Other: 0
|
||||
// CHECK-NEXT: Section: .text
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ]
|
||||
|
@ -13,17 +13,16 @@
|
||||
# CHECK-NEXT: 4: 000000000000001c 0 NOTYPE LOCAL DEFAULT 2 bar8
|
||||
# CHECK-NEXT: 5: 0000000000000020 0 NOTYPE LOCAL DEFAULT 2 bar9
|
||||
# CHECK-NEXT: 6: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar1
|
||||
# CHECK-NEXT: 7: 0000000000000028 0 NOTYPE GLOBAL DEFAULT 2 bar10
|
||||
# CHECK-NEXT: 8: 0000000000000030 0 NOTYPE GLOBAL DEFAULT 2 bar11
|
||||
# CHECK-NEXT: 9: 0000000000000030 0 NOTYPE GLOBAL DEFAULT 2 bar12
|
||||
# CHECK-NEXT: 10: 0000000000000034 0 NOTYPE GLOBAL DEFAULT 2 bar13
|
||||
# CHECK-NEXT: 11: 0000000000000038 0 NOTYPE GLOBAL DEFAULT 2 bar14
|
||||
# CHECK-NEXT: 12: 0000000000000040 0 NOTYPE GLOBAL DEFAULT 2 bar15
|
||||
# CHECK-NEXT: 13: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar2
|
||||
# CHECK-NEXT: 14: 0000000000000000 0 NOTYPE WEAK DEFAULT UND bar3
|
||||
# CHECK-NEXT: 15: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar4
|
||||
# CHECK-NEXT: 16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar5
|
||||
|
||||
# CHECK-NEXT: 7: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar2
|
||||
# CHECK-NEXT: 8: 0000000000000000 0 NOTYPE WEAK DEFAULT UND bar3
|
||||
# CHECK-NEXT: 9: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar4
|
||||
# CHECK-NEXT: 10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar5
|
||||
# CHECK-NEXT: 11: 0000000000000028 0 NOTYPE GLOBAL DEFAULT 2 bar10
|
||||
# CHECK-NEXT: 12: 0000000000000030 0 NOTYPE GLOBAL DEFAULT 2 bar11
|
||||
# CHECK-NEXT: 13: 0000000000000030 0 NOTYPE GLOBAL DEFAULT 2 bar12
|
||||
# CHECK-NEXT: 14: 0000000000000034 0 NOTYPE GLOBAL DEFAULT 2 bar13
|
||||
# CHECK-NEXT: 15: 0000000000000038 0 NOTYPE GLOBAL DEFAULT 2 bar14
|
||||
# CHECK-NEXT: 16: 0000000000000040 0 NOTYPE GLOBAL DEFAULT 2 bar15
|
||||
|
||||
.weakref foo1, bar1
|
||||
|
||||
|
@ -18,9 +18,9 @@ d1:
|
||||
f2:
|
||||
nop
|
||||
|
||||
// CHECK-LABEL: Name: d1
|
||||
// CHECK: Other: 0
|
||||
// CHECK-LABEL: Name: f1
|
||||
// CHECK: Other [ (0x80)
|
||||
// CHECK-LABEL: Name: d1
|
||||
// CHECK: Other: 0
|
||||
// CHECK-LABEL: Name: f2
|
||||
// CHECK: Other: 0
|
||||
|
@ -78,18 +78,18 @@ bar:
|
||||
# OBJ: Name: f_mm_insn_instr
|
||||
# OBJ: Other [ (0x80)
|
||||
|
||||
# OBJ: Name: f_normal_insn_data
|
||||
# OBJ: Other: 0
|
||||
|
||||
# OBJ: Name: f_normal_insn_instr
|
||||
# OBJ: Other: 0
|
||||
|
||||
# OBJ: Name: o_mm_insn_data
|
||||
# OBJ: Other [ (0x80)
|
||||
|
||||
# OBJ: Name: o_mm_insn_instr
|
||||
# OBJ: Other [ (0x80)
|
||||
|
||||
# OBJ: Name: f_normal_insn_data
|
||||
# OBJ: Other: 0
|
||||
|
||||
# OBJ: Name: f_normal_insn_instr
|
||||
# OBJ: Other: 0
|
||||
|
||||
# OBJ: Name: o_normal_insn_data
|
||||
# OBJ: Other: 0
|
||||
|
||||
|
@ -3,9 +3,10 @@
|
||||
|
||||
# CHECK: Type Bind Vis Ndx Name
|
||||
# CHECK: FUNC GLOBAL DEFAULT [<other: 0x60>] 2 foo
|
||||
# CHECK-NEXT: FUNC WEAK DEFAULT [<other: 0x60>] 2 foo@FBSD_1.1
|
||||
# CHECK-NEXT: FUNC WEAK DEFAULT [<other: 0x60>] 2 __impl_foo
|
||||
# CHECK-NEXT: FUNC GLOBAL DEFAULT [<other: 0x60>] 2 func
|
||||
# CHECK-NEXT: FUNC WEAK DEFAULT [<other: 0x60>] 2 weak_func
|
||||
# CHECK: FUNC WEAK DEFAULT [<other: 0x60>] 2 foo@FBSD_1.1
|
||||
|
||||
.text
|
||||
.abiversion 2
|
||||
|
Loading…
Reference in New Issue
Block a user