diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2015-05-06 11:46:36 -0700 |
---|---|---|
committer | Pirama Arumuga Nainar <pirama@google.com> | 2015-05-18 10:52:30 -0700 |
commit | 2c3e0051c31c3f5b2328b447eadf1cf9c4427442 (patch) | |
tree | c0104029af14e9f47c2ef58ca60e6137691f3c9b /test/MC/ELF | |
parent | e1bc145815f4334641be19f1c45ecf85d25b6e5a (diff) | |
download | external_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.zip external_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.tar.gz external_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.tar.bz2 |
Update aosp/master LLVM for rebase to r235153
Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7
(cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
Diffstat (limited to 'test/MC/ELF')
41 files changed, 90 insertions, 75 deletions
diff --git a/test/MC/ELF/alias.s b/test/MC/ELF/alias.s index 78df737..0ab6dd4 100644 --- a/test/MC/ELF/alias.s +++ b/test/MC/ELF/alias.s @@ -24,6 +24,15 @@ bar5 = bar4 bar6 = bar5 bar6: +// Test that indirect local aliases do not appear as symbols. +.data +.Llocal: + +.text +leaq .Llocal1(%rip), %rdi +.Llocal1 = .Llocal2 +.Llocal2 = .Llocal + // CHECK: Symbols [ // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: (0) diff --git a/test/MC/ELF/basic-elf-32.s b/test/MC/ELF/basic-elf-32.s index e12fc52..16266af 100644 --- a/test/MC/ELF/basic-elf-32.s +++ b/test/MC/ELF/basic-elf-32.s @@ -45,7 +45,7 @@ main: # @main // CHECK: Name: .rel.text // CHECK: Relocations [ -// CHECK: Section (2) .rel.text { +// CHECK: Section {{.*}} .rel.text { // CHECK: 0x6 R_386_32 .L.str1 // CHECK: 0xB R_386_PC32 puts // CHECK: 0x12 R_386_32 .L.str2 diff --git a/test/MC/ELF/basic-elf-64.s b/test/MC/ELF/basic-elf-64.s index a77f3e6..d99125e 100644 --- a/test/MC/ELF/basic-elf-64.s +++ b/test/MC/ELF/basic-elf-64.s @@ -45,7 +45,7 @@ main: # @main // CHECK: Name: .rela.text // CHECK: Relocations [ -// CHECK: Section (2) .rela.text { +// CHECK: Section {{.*}} .rela.text { // CHECK: 0x5 R_X86_64_32 .rodata.str1.1 0x0 // CHECK: 0xA R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC // CHECK: 0xF R_X86_64_32 .rodata.str1.1 0x6 diff --git a/test/MC/ELF/cfi-adjust-cfa-offset.s b/test/MC/ELF/cfi-adjust-cfa-offset.s index 200f897..bbaa785 100644 --- a/test/MC/ELF/cfi-adjust-cfa-offset.s +++ b/test/MC/ELF/cfi-adjust-cfa-offset.s @@ -53,7 +53,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x3C8 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 72 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-advance-loc2.s b/test/MC/ELF/cfi-advance-loc2.s index 98caa01..be14a43 100644 --- a/test/MC/ELF/cfi-advance-loc2.s +++ b/test/MC/ELF/cfi-advance-loc2.s @@ -38,7 +38,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x490 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-def-cfa-offset.s b/test/MC/ELF/cfi-def-cfa-offset.s index 59f7400..d84ab82 100644 --- a/test/MC/ELF/cfi-def-cfa-offset.s +++ b/test/MC/ELF/cfi-def-cfa-offset.s @@ -40,7 +40,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x398 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-def-cfa-register.s b/test/MC/ELF/cfi-def-cfa-register.s index 178ba32..1efe0b2 100644 --- a/test/MC/ELF/cfi-def-cfa-register.s +++ b/test/MC/ELF/cfi-def-cfa-register.s @@ -35,7 +35,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-def-cfa.s b/test/MC/ELF/cfi-def-cfa.s index dfb0d4b..5e185d5 100644 --- a/test/MC/ELF/cfi-def-cfa.s +++ b/test/MC/ELF/cfi-def-cfa.s @@ -35,7 +35,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-escape.s b/test/MC/ELF/cfi-escape.s index 5394ee4..5c427d6 100644 --- a/test/MC/ELF/cfi-escape.s +++ b/test/MC/ELF/cfi-escape.s @@ -36,7 +36,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-offset.s b/test/MC/ELF/cfi-offset.s index a65b4fc..ad73b50 100644 --- a/test/MC/ELF/cfi-offset.s +++ b/test/MC/ELF/cfi-offset.s @@ -35,7 +35,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-register.s b/test/MC/ELF/cfi-register.s index 9441770..48fd879 100644 --- a/test/MC/ELF/cfi-register.s +++ b/test/MC/ELF/cfi-register.s @@ -36,7 +36,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-rel-offset.s b/test/MC/ELF/cfi-rel-offset.s index 0dc69c8..15e1f9e 100644 --- a/test/MC/ELF/cfi-rel-offset.s +++ b/test/MC/ELF/cfi-rel-offset.s @@ -44,7 +44,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x3A0 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-rel-offset2.s b/test/MC/ELF/cfi-rel-offset2.s index 360e7b0..53c2075 100644 --- a/test/MC/ELF/cfi-rel-offset2.s +++ b/test/MC/ELF/cfi-rel-offset2.s @@ -35,7 +35,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-remember.s b/test/MC/ELF/cfi-remember.s index 3a38948..d9de0ff 100644 --- a/test/MC/ELF/cfi-remember.s +++ b/test/MC/ELF/cfi-remember.s @@ -38,7 +38,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-restore.s b/test/MC/ELF/cfi-restore.s index e225797..19e1624 100644 --- a/test/MC/ELF/cfi-restore.s +++ b/test/MC/ELF/cfi-restore.s @@ -36,7 +36,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-same-value.s b/test/MC/ELF/cfi-same-value.s index 2d37f4d..53da4dc 100644 --- a/test/MC/ELF/cfi-same-value.s +++ b/test/MC/ELF/cfi-same-value.s @@ -36,7 +36,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-undefined.s b/test/MC/ELF/cfi-undefined.s index 568b315..7afeea6 100644 --- a/test/MC/ELF/cfi-undefined.s +++ b/test/MC/ELF/cfi-undefined.s @@ -36,7 +36,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-window-save.s b/test/MC/ELF/cfi-window-save.s index b083901..00fd37f 100644 --- a/test/MC/ELF/cfi-window-save.s +++ b/test/MC/ELF/cfi-window-save.s @@ -38,7 +38,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi-zero-addr-delta.s b/test/MC/ELF/cfi-zero-addr-delta.s index 8662839..85aa3e1 100644 --- a/test/MC/ELF/cfi-zero-addr-delta.s +++ b/test/MC/ELF/cfi-zero-addr-delta.s @@ -43,7 +43,7 @@ f: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x398 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/cfi.s b/test/MC/ELF/cfi.s index 21be615..dc61dca 100644 --- a/test/MC/ELF/cfi.s +++ b/test/MC/ELF/cfi.s @@ -355,7 +355,7 @@ f37: // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0xE70 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 1752 // CHECK-NEXT: Link: 7 // CHECK-NEXT: Info: 4 diff --git a/test/MC/ELF/common.s b/test/MC/ELF/common.s index bd96564..b7e6ba0 100644 --- a/test/MC/ELF/common.s +++ b/test/MC/ELF/common.s @@ -45,7 +45,7 @@ // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: Object // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .bss (0x4) +// CHECK-NEXT: Section: .bss // CHECK-NEXT: } diff --git a/test/MC/ELF/compression.s b/test/MC/ELF/compression.s index 07b689e..5560ba7 100644 --- a/test/MC/ELF/compression.s +++ b/test/MC/ELF/compression.s @@ -10,7 +10,6 @@ // Check for the 'ZLIB' file magic at the start of the section only // CHECK-NEXT: ZLIB // CHECK-NOT: ZLIB -// CHECK: Contents of // Don't compress small sections, such as this simple debug_abbrev example // CHECK: Contents of section .debug_abbrev: diff --git a/test/MC/ELF/debug-line.s b/test/MC/ELF/debug-line.s index 38ef828..072265c 100644 --- a/test/MC/ELF/debug-line.s +++ b/test/MC/ELF/debug-line.s @@ -17,7 +17,7 @@ // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 57 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 diff --git a/test/MC/ELF/ifunc-reloc.s b/test/MC/ELF/ifunc-reloc.s index 0195463..6f1d79b 100644 --- a/test/MC/ELF/ifunc-reloc.s +++ b/test/MC/ELF/ifunc-reloc.s @@ -10,7 +10,7 @@ alias: callq sym // CHECK: Relocations [ -// CHECK-NEXT: Section (2) .rela.text { +// CHECK-NEXT: Section {{.*}} .rela.text { // CHECK-NEXT: 0x1 R_X86_64_PC32 sym 0xFFFFFFFFFFFFFFFC // CHECK-NEXT: } // CHECK-NEXT: ] diff --git a/test/MC/ELF/local-reloc.s b/test/MC/ELF/local-reloc.s index 19b9509..ce0b674 100644 --- a/test/MC/ELF/local-reloc.s +++ b/test/MC/ELF/local-reloc.s @@ -7,7 +7,7 @@ foo: // CHECK: Relocations [ -// CHECK: Section (2) .rela.text { +// CHECK: Section {{.*}} .rela.text { // CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32S .text 0x{{[^ ]+}} // CHECK-NEXT: } // CHECK-NEXT: ] diff --git a/test/MC/ELF/merge.s b/test/MC/ELF/merge.s index d6e0b7c..e787728 100644 --- a/test/MC/ELF/merge.s +++ b/test/MC/ELF/merge.s @@ -21,7 +21,7 @@ zed: foo: // CHECK: Relocations [ -// CHECK-NEXT: Section (2) .rela.text { +// CHECK-NEXT: Section {{.*}} .rela.text { // CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_PC32 .Lfoo 0x{{[^ ]+}} // CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32 .sec1 0x{{[^ ]+}} // CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32 .Lfoo 0x{{[^ ]+}} diff --git a/test/MC/ELF/pr19582.s b/test/MC/ELF/pr19582.s new file mode 100644 index 0000000..304cacb --- /dev/null +++ b/test/MC/ELF/pr19582.s @@ -0,0 +1,8 @@ +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s + +a: + .section foo + c = b +b: + // CHECK: 0x0 R_X86_64_PC32 .text 0x0 + .long a - c diff --git a/test/MC/ELF/relocation-386.s b/test/MC/ELF/relocation-386.s index b998ea5..2af6add 100644 --- a/test/MC/ELF/relocation-386.s +++ b/test/MC/ELF/relocation-386.s @@ -4,7 +4,7 @@ // correctly point to the section or the symbol. // CHECK: Relocations [ -// CHECK-NEXT: Section (2) .rel.text { +// CHECK-NEXT: Section {{.*}} .rel.text { // CHECK-NEXT: 0x2 R_386_GOTOFF .Lfoo 0x0 // CHECK-NEXT: 0x{{[^ ]+}} R_386_PLT32 bar2 0x0 // CHECK-NEXT: 0x{{[^ ]+}} R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0 @@ -79,7 +79,7 @@ // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: TLS // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: zedsec (0x5) +// CHECK-NEXT: Section: zedsec // CHECK-NEXT: } // Symbol 7 is section 4 // CHECK: Symbol { @@ -89,7 +89,7 @@ // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: Section // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .bss (0x4) +// CHECK-NEXT: Section: .bss // CHECK-NEXT: } .text diff --git a/test/MC/ELF/relocation-pc.s b/test/MC/ELF/relocation-pc.s index 0ce3201..a8783a7 100644 --- a/test/MC/ELF/relocation-pc.s +++ b/test/MC/ELF/relocation-pc.s @@ -13,13 +13,13 @@ // CHECK-NEXT: } // CHECK: Section { -// CHECK: Index: 2 -// CHECK-NEXT: Name: .rela.text +// CHECK: Index: +// CHECK: Name: .rela.text // CHECK-NEXT: Type: SHT_RELA // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x2E8 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 48 // CHECK-NEXT: Link: 6 // CHECK-NEXT: Info: 1 diff --git a/test/MC/ELF/rename.s b/test/MC/ELF/rename.s index 5364dde..a7f9638 100644 --- a/test/MC/ELF/rename.s +++ b/test/MC/ELF/rename.s @@ -15,33 +15,14 @@ defined3: .global defined1 -// Section 1 is .text // CHECK: Section { -// CHECK: Index: 1 -// CHECK-NEXT: Name: .text -// CHECK-NEXT: Type: SHT_PROGBITS -// CHECK-NEXT: Flags [ -// CHECK-NEXT: SHF_ALLOC -// CHECK-NEXT: SHF_EXECINSTR -// CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x40 -// CHECK-NEXT: Size: 4 -// CHECK-NEXT: Link: 0 -// CHECK-NEXT: Info: 0 -// CHECK-NEXT: AddressAlignment: 4 -// CHECK-NEXT: EntrySize: 0 -// CHECK-NEXT: Relocations [ -// CHECK-NEXT: ] -// CHECK-NEXT: } -// CHECK-NEXT: Section { -// CHECK-NEXT: Index: 2 -// CHECK-NEXT: Name: .rela.text (1) +// CHECK: Index: +// CHECK: Name: .rela.text // CHECK-NEXT: Type: SHT_RELA (0x4) // CHECK-NEXT: Flags [ (0x0) // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x320 +// CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 6 // CHECK-NEXT: Info: 1 @@ -51,15 +32,3 @@ defined3: // CHECK-NEXT: 0x0 R_X86_64_32 .text 0x0 // CHECK-NEXT: ] // CHECK-NEXT: } - - -// Symbol 2 is section 1 -// CHECK: Symbol { -// CHECK: Name: .text (0) -// CHECK-NEXT: Value: 0x0 -// CHECK-NEXT: Size: 0 -// CHECK-NEXT: Binding: Local -// CHECK-NEXT: Type: Section -// CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .text (0x1) -// CHECK-NEXT: } diff --git a/test/MC/ELF/section-sym2.s b/test/MC/ELF/section-sym2.s index acdb7d9..f62e3f9 100644 --- a/test/MC/ELF/section-sym2.s +++ b/test/MC/ELF/section-sym2.s @@ -6,7 +6,7 @@ mov .rodata, %rsi .section .rodata // CHECK:Relocations [ -// CHECK: Section (2) .rela.text { +// CHECK: Section {{.*}} .rela.text { // CHECK: Relocation { // CHECK: Offset: 0x4 // CHECK: Type: R_X86_64_32S (11) diff --git a/test/MC/ELF/section-unique-err1.s b/test/MC/ELF/section-unique-err1.s new file mode 100644 index 0000000..3a997d1 --- /dev/null +++ b/test/MC/ELF/section-unique-err1.s @@ -0,0 +1,5 @@ +// RUN: not llvm-mc -triple x86_64-pc-linux-gnu %s -o - 2>&1 | FileCheck %s + +// CHECK: error: expected absolute expression + + .section .text,"ax",@progbits,unique, "abc" diff --git a/test/MC/ELF/section-unique-err2.s b/test/MC/ELF/section-unique-err2.s new file mode 100644 index 0000000..7b7cd5f --- /dev/null +++ b/test/MC/ELF/section-unique-err2.s @@ -0,0 +1,5 @@ +// RUN: not llvm-mc -triple x86_64-pc-linux-gnu %s -o - 2>&1 | FileCheck %s + +// CHECK: error: unique id must be positive + + .section .text,"ax",@progbits,unique, -1 diff --git a/test/MC/ELF/section-unique-err3.s b/test/MC/ELF/section-unique-err3.s new file mode 100644 index 0000000..bbccd24 --- /dev/null +++ b/test/MC/ELF/section-unique-err3.s @@ -0,0 +1,5 @@ +// RUN: not llvm-mc -triple x86_64-pc-linux-gnu %s -o - 2>&1 | FileCheck %s + +// CHECK: error: unique id is too large + + .section .text,"ax",@progbits,unique, 4294967295 diff --git a/test/MC/ELF/section-unique-err4.s b/test/MC/ELF/section-unique-err4.s new file mode 100644 index 0000000..3c82682 --- /dev/null +++ b/test/MC/ELF/section-unique-err4.s @@ -0,0 +1,5 @@ +// RUN: not llvm-mc -triple x86_64-pc-linux-gnu %s -o - 2>&1 | FileCheck %s + +// CHECK: error: expected commma + + .section .text,"ax",@progbits,unique 1 diff --git a/test/MC/ELF/section-unique.s b/test/MC/ELF/section-unique.s index b482af3..3fe7271 100644 --- a/test/MC/ELF/section-unique.s +++ b/test/MC/ELF/section-unique.s @@ -1,22 +1,22 @@ // RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -o - | FileCheck %s // RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s --check-prefix=OBJ - .section .text,"ax",@progbits,unique + .section .text,"ax",@progbits,unique, 4294967293 .globl f f: nop - .section .text,"ax",@progbits,unique + .section .text,"ax",@progbits,unique, 4294967294 .globl g g: nop // test that f and g are in different sections. -// CHECK: .section .text,"ax",@progbits,unique +// CHECK: .section .text,"ax",@progbits,unique,4294967293 // CHECK: f: -// CHECK: .section .text,"ax",@progbits,unique +// CHECK: .section .text,"ax",@progbits,unique,4294967294 // CHECK: g: // OBJ: Symbol { diff --git a/test/MC/ELF/symver-msvc.s b/test/MC/ELF/symver-msvc.s index d6730ca..a726ff3 100644 --- a/test/MC/ELF/symver-msvc.s +++ b/test/MC/ELF/symver-msvc.s @@ -11,7 +11,7 @@ // CHECK: Relocations [ -// CHECK-NEXT: Section (2) .rela.text { +// CHECK-NEXT: Section {{.*}} .rela.text { // CHECK-NEXT: 0x0 R_X86_64_32 ??_R0?AVexception@std@@@8 0x0 // CHECK-NEXT: 0x4 R_X86_64_32 @??_R0?AVinvalid_argument@std@@@8 0x0 // CHECK-NEXT: 0x8 R_X86_64_32 __imp_??_R0?AVlogic_error@std@@@8 0x0 diff --git a/test/MC/ELF/symver.s b/test/MC/ELF/symver.s index 6e5825f..80d71fd 100644 --- a/test/MC/ELF/symver.s +++ b/test/MC/ELF/symver.s @@ -22,7 +22,7 @@ defined3: global1: // CHECK: Relocations [ -// CHECK-NEXT: Section (2) .rela.text { +// CHECK-NEXT: Section {{.*}} .rela.text { // CHECK-NEXT: 0x0 R_X86_64_32 .text 0x0 // CHECK-NEXT: 0x4 R_X86_64_32 bar2@zed 0x0 // CHECK-NEXT: 0x8 R_X86_64_32 .text 0x0 diff --git a/test/MC/ELF/tls.s b/test/MC/ELF/tls.s index 79865cd..940827b 100644 --- a/test/MC/ELF/tls.s +++ b/test/MC/ELF/tls.s @@ -19,7 +19,7 @@ foobar: // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: TLS // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .zed (0x5) +// CHECK-NEXT: Section: .zed // CHECK-NEXT: } // CHECK: Symbol { diff --git a/test/MC/ELF/weak-diff2.s b/test/MC/ELF/weak-diff2.s new file mode 100644 index 0000000..daf64a4 --- /dev/null +++ b/test/MC/ELF/weak-diff2.s @@ -0,0 +1,10 @@ +// RUN: not llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t 2>&1 | FileCheck %s + +// CHECK: error: Cannot represent a subtraction with a weak symbol + +.weak f +f: + nop +g: + nop +.quad g - f diff --git a/test/MC/ELF/weakref.s b/test/MC/ELF/weakref.s index 2288264..9485e49 100644 --- a/test/MC/ELF/weakref.s +++ b/test/MC/ELF/weakref.s @@ -131,7 +131,7 @@ bar15: // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: Section // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .data (0x3) +// CHECK-NEXT: Section: .data // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: .bss @@ -140,7 +140,7 @@ bar15: // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: Section // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .bss (0x4) +// CHECK-NEXT: Section: .bss // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: bar10 |