[lld] r373671 - [llvm-objdump] Further rearrange llvm-objdump sections for compatability
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 15:01:08 PDT 2019
Author: rupprecht
Date: Thu Oct 3 15:01:08 2019
New Revision: 373671
URL: http://llvm.org/viewvc/llvm-project?rev=373671&view=rev
Log:
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
Modified:
lld/trunk/test/ELF/arm-icf-exidx.s
lld/trunk/test/ELF/arm-target1.s
lld/trunk/test/ELF/eh-frame-hdr-abs-fde.s
lld/trunk/test/ELF/got32-i386.s
lld/trunk/test/ELF/got32x-i386.s
lld/trunk/test/ELF/i386-pc8-pc16-addend.s
lld/trunk/test/ELF/i386-reloc8-reloc16-addend.s
lld/trunk/test/ELF/i386-retpoline-nopic.s
lld/trunk/test/ELF/i386-retpoline-pic.s
lld/trunk/test/ELF/mips-32.s
lld/trunk/test/ELF/mips-64-got.s
lld/trunk/test/ELF/mips-64-rels.s
lld/trunk/test/ELF/mips-64.s
lld/trunk/test/ELF/mips-got16-relocatable.s
lld/trunk/test/ELF/mips-got16.s
lld/trunk/test/ELF/mips-gp-disp.s
lld/trunk/test/ELF/mips-gp-ext.s
lld/trunk/test/ELF/mips-gp-local.s
lld/trunk/test/ELF/mips-gprel32-relocs-gp0.s
lld/trunk/test/ELF/mips-gprel32-relocs.s
lld/trunk/test/ELF/mips-hilo-gp-disp.s
lld/trunk/test/ELF/mips-hilo-hi-only.s
lld/trunk/test/ELF/mips-hilo.s
lld/trunk/test/ELF/mips-mgot.s
lld/trunk/test/ELF/mips-micro-cross-calls.s
lld/trunk/test/ELF/mips-micro-relocs.s
lld/trunk/test/ELF/mips-micror6-relocs.s
lld/trunk/test/ELF/mips-n32-rels.s
lld/trunk/test/ELF/mips-nonalloc.s
lld/trunk/test/ELF/mips-pc-relocs.s
lld/trunk/test/ELF/mips-tls-64.s
lld/trunk/test/ELF/mips-tls-hilo.s
lld/trunk/test/ELF/mips-tls-static-64.s
lld/trunk/test/ELF/mips-tls-static.s
lld/trunk/test/ELF/mips-tls.s
lld/trunk/test/ELF/msp430.s
lld/trunk/test/ELF/non-alloc-link-order-gc.s
lld/trunk/test/ELF/relocation-common.s
lld/trunk/test/ELF/relocation.s
lld/trunk/test/ELF/x86-64-retpoline-znow.s
lld/trunk/test/ELF/x86-64-retpoline.s
Modified: lld/trunk/test/ELF/arm-icf-exidx.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/arm-icf-exidx.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/arm-icf-exidx.s (original)
+++ lld/trunk/test/ELF/arm-icf-exidx.s Thu Oct 3 15:01:08 2019
@@ -22,6 +22,9 @@ __aeabi_unwind_cpp_pr0:
nop
bx lr
+// CHECK: Contents of section .ARM.exidx:
+// CHECK-NEXT: 100d4 18100000 b0b0b080 14100000 01000000
+
// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK-NEXT: g:
@@ -29,6 +32,3 @@ __aeabi_unwind_cpp_pr0:
// CHECK: __aeabi_unwind_cpp_pr0:
// CHECK-NEXT: 110f0: 00 f0 20 e3 nop
// CHECK-NEXT: 110f4: 1e ff 2f e1 bx lr
-
-// CHECK: Contents of section .ARM.exidx:
-// CHECK-NEXT: 100d4 18100000 b0b0b080 14100000 01000000
Modified: lld/trunk/test/ELF/arm-target1.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/arm-target1.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/arm-target1.s (original)
+++ lld/trunk/test/ELF/arm-target1.s Thu Oct 3 15:01:08 2019
@@ -25,12 +25,12 @@
.word 32
// Force generation of $d.0 as section is not all data
nop
+// RELATIVE: SYMBOL TABLE:
+// RELATIVE: 00001154 .text 00000000 patatino
// RELATIVE: Disassembly of section .text:
// RELATIVE-EMPTY:
// RELATIVE: $d.0:
// RELATIVE: 1150: 04 00 00 00 .word 0x00000004
-// RELATIVE: SYMBOL TABLE:
-// RELATIVE: 00001154 .text 00000000 patatino
// ABS: can't create dynamic relocation R_ARM_TARGET1 against symbol: patatino in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// ABS: >>> defined in {{.*}}.o
Modified: lld/trunk/test/ELF/eh-frame-hdr-abs-fde.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/eh-frame-hdr-abs-fde.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/eh-frame-hdr-abs-fde.s (original)
+++ lld/trunk/test/ELF/eh-frame-hdr-abs-fde.s Thu Oct 3 15:01:08 2019
@@ -7,6 +7,10 @@
# RUN: ld.lld --eh-frame-hdr %t.o -o %t
# RUN: llvm-objdump -s -dwarf=frames %t | FileCheck %s
+# CHECK: Augmentation: "zLR"
+# CHECK: Augmentation data: 00 1B
+# ^-- DW_EH_PE_pcrel | DW_EH_PE_udata4 | DW_EH_PE_signed
+
# CHECK: Contents of section .eh_frame_hdr:
# CHECK-NEXT: 200190 011b033b 14000000 01000000 54100000
# ^-- 0x201000 - 0x200190
@@ -15,10 +19,6 @@
# CHECK: Contents of section .text:
# CHECK-NEXT: 2011e4 90
-# CHECK: Augmentation: "zLR"
-# CHECK: Augmentation data: 00 1B
-# ^-- DW_EH_PE_pcrel | DW_EH_PE_udata4 | DW_EH_PE_signed
-
.text
.globl __start
__start:
Modified: lld/trunk/test/ELF/got32-i386.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/got32-i386.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/got32-i386.s (original)
+++ lld/trunk/test/ELF/got32-i386.s Thu Oct 3 15:01:08 2019
@@ -13,11 +13,11 @@ _start:
movl foo at GOT, %ebx
## 73728 == 0x12000 == ADDR(.got)
-# CHECK: _start:
-# CHECK-NEXT: 4010f5: 8b 1d {{.*}} movl 4202748, %ebx
# CHECK: Sections:
# CHECK: Name Size VMA
# CHECK: .got 00000004 00000000004020fc
+# CHECK: _start:
+# CHECK-NEXT: 4010f5: 8b 1d {{.*}} movl 4202748, %ebx
# RUN: not ld.lld %t.o -o %t -pie 2>&1 | FileCheck %s --check-prefix=ERR
# ERR: error: symbol 'foo' cannot be preempted; recompile with -fPIE
Modified: lld/trunk/test/ELF/got32x-i386.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/got32x-i386.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/got32x-i386.s (original)
+++ lld/trunk/test/ELF/got32x-i386.s Thu Oct 3 15:01:08 2019
@@ -32,14 +32,14 @@
# RUN: llvm-objdump -section-headers -d %t1 | FileCheck %s
## 73728 == 0x12000 == ADDR(.got)
+# CHECK: Sections:
+# CHECK: Name Size VMA
+# CHECK: .got.plt 0000000c 0000000000403134
# CHECK: _start:
# CHECK-NEXT: 401115: 8b 05 {{.*}} movl 4202800, %eax
# CHECK-NEXT: 40111b: 8b 1d {{.*}} movl 4202800, %ebx
# CHECK-NEXT: 401121: 8b 80 {{.*}} movl -4100(%eax), %eax
# CHECK-NEXT: 401127: 8b 83 {{.*}} movl -4100(%ebx), %eax
-# CHECK: Sections:
-# CHECK: Name Size VMA
-# CHECK: .got.plt 0000000c 0000000000403134
# RUN: not ld.lld %S/Inputs/i386-got32x-baseless.elf -o %t1 -pie 2>&1 | \
# RUN: FileCheck %s --check-prefix=ERR
Modified: lld/trunk/test/ELF/i386-pc8-pc16-addend.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/i386-pc8-pc16-addend.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/i386-pc8-pc16-addend.s (original)
+++ lld/trunk/test/ELF/i386-pc8-pc16-addend.s Thu Oct 3 15:01:08 2019
@@ -3,12 +3,12 @@
# RUN: ld.lld %t1.o -o %t.out
# RUN: llvm-objdump -s -t %t.out | FileCheck %s
+# CHECK: SYMBOL TABLE:
+# CHECK: 004010b7 .und
# CHECK: Contents of section .text:
# CHECK-NEXT: 4010b4 020000
## 0x4010b7 - 0x4010b4 + addend(-1) = 0x02
## 0x4010b7 - 0x4010b5 + addend(-2) = 0x0000
-# CHECK: SYMBOL TABLE:
-# CHECK: 004010b7 .und
.byte und-.-1
.short und-.-2
Modified: lld/trunk/test/ELF/i386-reloc8-reloc16-addend.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/i386-reloc8-reloc16-addend.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/i386-reloc8-reloc16-addend.s (original)
+++ lld/trunk/test/ELF/i386-reloc8-reloc16-addend.s Thu Oct 3 15:01:08 2019
@@ -3,12 +3,12 @@
# RUN: ld.lld -Ttext=0x0 %t1.o -o %t.out
# RUN: llvm-objdump -s -t %t.out | FileCheck %s
-# CHECK: Contents of section .text:
-# CHECK-NEXT: 0000 020100
## 0x3 + addend(-1) = 0x02
## 0x3 + addend(-2) = 0x0100
# CHECK: SYMBOL TABLE:
# CHECK: 00000003 .und
+# CHECK: Contents of section .text:
+# CHECK-NEXT: 0000 020100
.byte und-1
.short und-2
Modified: lld/trunk/test/ELF/i386-retpoline-nopic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/i386-retpoline-nopic.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/i386-retpoline-nopic.s (original)
+++ lld/trunk/test/ELF/i386-retpoline-nopic.s Thu Oct 3 15:01:08 2019
@@ -6,6 +6,10 @@
// RUN: ld.lld %t1.o %t2.so -o %t.exe -z retpolineplt
// RUN: llvm-objdump -d -s --no-show-raw-insn %t.exe | FileCheck %s
+// CHECK: Contents of section .got.plt:
+// CHECK-NEXT: 40224000 00000000 00000000 10124000
+// CHECK-NEXT: 30124000
+
// CHECK: Disassembly of section .plt:
// CHECK-EMPTY:
// CHECK-NEXT: .plt:
@@ -56,10 +60,6 @@
// CHECK-NEXT: 40123e: int3
// CHECK-NEXT: 40123f: int3
-// CHECK: Contents of section .got.plt:
-// CHECK-NEXT: 40224000 00000000 00000000 10124000
-// CHECK-NEXT: 30124000
-
.global _start
_start:
jmp bar at PLT
Modified: lld/trunk/test/ELF/i386-retpoline-pic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/i386-retpoline-pic.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/i386-retpoline-pic.s (original)
+++ lld/trunk/test/ELF/i386-retpoline-pic.s Thu Oct 3 15:01:08 2019
@@ -6,6 +6,10 @@
// RUN: ld.lld %t1.o %t2.so -o %t.exe -z retpolineplt -pie
// RUN: llvm-objdump -d -s --no-show-raw-insn %t.exe | FileCheck %s
+// CHECK: Contents of section .got.plt:
+// CHECK-NEXT: 32a8 40220000 00000000 00000000 11120000
+// CHECK-NEXT: 32b8 31120000
+
// CHECK: Disassembly of section .plt:
// CHECK-EMPTY:
// CHECK-NEXT: .plt:
@@ -53,10 +57,6 @@
// CHECK-NEXT: 123e: int3
// CHECK-NEXT: 123f: int3
-// CHECK: Contents of section .got.plt:
-// CHECK-NEXT: 32a8 40220000 00000000 00000000 11120000
-// CHECK-NEXT: 32b8 31120000
-
.global _start
_start:
jmp bar at PLT
Modified: lld/trunk/test/ELF/mips-32.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-32.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-32.s (original)
+++ lld/trunk/test/ELF/mips-32.s Thu Oct 3 15:01:08 2019
@@ -24,6 +24,9 @@ v1:
v2:
.word v1 # R_MIPS_32 target v1 addend 0
+# SYM: SYMBOL TABLE:
+# SYM: 00011000 .data 00000000 v1
+
# BE: Contents of section .data:
# BE-NEXT: {{.*}} 00000004 00011000
# ^-- v2+4 ^-- v1
@@ -31,10 +34,6 @@ v2:
# EL: Contents of section .data:
# EL-NEXT: {{.*}} 04000000 00100100
# ^-- v2+4 ^-- v1
-
-# SYM: SYMBOL TABLE:
-# SYM: 00011000 .data 00000000 v1
-
# REL: Relocation section
# REL: {{.*}} R_MIPS_REL32
# REL-NEXT: {{.*}} R_MIPS_REL32 [[V2:[0-9a-f]+]]
Modified: lld/trunk/test/ELF/mips-64-got.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-64-got.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-64-got.s (original)
+++ lld/trunk/test/ELF/mips-64-got.s Thu Oct 3 15:01:08 2019
@@ -10,6 +10,8 @@
# RUN: llvm-objdump -d -t --no-show-raw-insn %t.exe | FileCheck %s
# RUN: llvm-readelf -r -s -A %t.exe | FileCheck -check-prefix=GOT %s
+# CHECK: {{[0-9a-f]+}}1c8 .text 00000000 foo
+
# CHECK: __start:
# CHECK-NEXT: {{.*}} ld $2, -32736($gp)
# CHECK-NEXT: {{.*}} daddiu $2, $2, 456
@@ -17,8 +19,6 @@
# CHECK-NEXT: {{.*}} addiu $2, $2, -32720
# CHECK-NEXT: {{.*}} addiu $2, $2, -32712
-# CHECK: {{[0-9a-f]+}}1c8 .text 00000000 foo
-
# GOT: There are no relocations in this file.
# GOT: Symbol table '.symtab'
Modified: lld/trunk/test/ELF/mips-64-rels.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-64-rels.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-64-rels.s (original)
+++ lld/trunk/test/ELF/mips-64-rels.s Thu Oct 3 15:01:08 2019
@@ -11,6 +11,12 @@
# RUN: llvm-objdump -d -s -t --print-imm-hex --no-show-raw-insn %t.exe | FileCheck %s
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s
+# CHECK: 0000000000037ff0 .got 00000000 .hidden _gp
+
+# CHECK: Contents of section .rodata:
+# CHECK-NEXT: {{[0-9a-f]+}} ffffffff fffe9014
+# ^-- 0x21004 - 0x37ff0 = 0xfffffffffffe9014
+
# CHECK: __start:
# CHECK-NEXT: 21000: lui $gp, 0x1
# ^-- 0x21000 - 0x37ff0
@@ -22,12 +28,6 @@
# ^-- 0 - 0xfffffffffffe9010
# ^-- %lo(0x16ff0)
-# CHECK: Contents of section .rodata:
-# CHECK-NEXT: {{[0-9a-f]+}} ffffffff fffe9014
-# ^-- 0x21004 - 0x37ff0 = 0xfffffffffffe9014
-
-# CHECK: 0000000000037ff0 .got 00000000 .hidden _gp
-
# REL: Relocations [
# REL-NEXT: ]
Modified: lld/trunk/test/ELF/mips-64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-64.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-64.s (original)
+++ lld/trunk/test/ELF/mips-64.s Thu Oct 3 15:01:08 2019
@@ -13,11 +13,11 @@ v1:
v2:
.quad v1 # R_MIPS_64 target v1 addend 0
-# SYM: Contents of section .data:
-# SYM-NEXT: {{.*}} 00000000 00000008 00000000 [[V1:[0-9a-f]+]]
-
# SYM: SYMBOL TABLE:
-# SYM: 00000000[[V1]] .data 00000000 v1
+# SYM: 00000000[[V1:[0-9a-f]+]] .data 00000000 v1
+
+# SYM: Contents of section .data:
+# SYM-NEXT: {{.*}} 00000000 00000008 00000000 [[V1]]
# CHECK: Relocation section
# CHECK: [[V2:[0-9a-f]+]] {{.*}} R_MIPS_REL32/R_MIPS_64/R_MIPS_NONE
Modified: lld/trunk/test/ELF/mips-got16-relocatable.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-got16-relocatable.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-got16-relocatable.s (original)
+++ lld/trunk/test/ELF/mips-got16-relocatable.s Thu Oct 3 15:01:08 2019
@@ -21,17 +21,17 @@
# OBJ-NEXT: addiu $4, $25, 16
# OBJ-NEXT: 00000014: R_MIPS_LO16 .data
+# SO: SYMBOL TABLE
+# SO: {{0*}}[[D1:[0-9a-f]{1,4}]] .data {{0+}} data
+# SO: {{0*}}[[D2:[0-9a-f]{1,4}]] .data {{0+}} data
+
# SO: Disassembly of section .text:
# SO-EMPTY:
# SO-NEXT: .text:
# SO-NEXT: lw $25, -0x7fe8($gp)
-# SO-NEXT: addiu $4, $25, 0x[[D1:[0-9a-f]+]]
+# SO-NEXT: addiu $4, $25, 0x[[D1]]
# SO: lw $25, -0x7fe8($gp)
-# SO-NEXT: addiu $4, $25, 0x[[D2:[0-9a-f]+]]
-
-# SO: SYMBOL TABLE
-# SO: [[D1]]
-# SO: [[D2]]
+# SO-NEXT: addiu $4, $25, 0x[[D2]]
.text
lw $t9, %got(.data)($gp)
Modified: lld/trunk/test/ELF/mips-got16.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-got16.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-got16.s (original)
+++ lld/trunk/test/ELF/mips-got16.s Thu Oct 3 15:01:08 2019
@@ -10,6 +10,10 @@
# RUN: llvm-objdump -d -t --no-show-raw-insn %t.so | FileCheck %s
# RUN: llvm-readelf -r -A %t.so | FileCheck -check-prefix=GOT %s
+# CHECK: SYMBOL TABLE:
+# CHECK: 00024008 .data 00000000 .hidden bar
+# CHECK: 00000000 *UND* 00000000 foo
+
# CHECK: __start:
# CHECK-NEXT: lw $8, -32744($gp)
# CHECK-NEXT: addi $8, $8, 8236
@@ -22,10 +26,6 @@
# CHECK-NEXT: lw $8, -32720($gp)
# CHECK-NEXT: addi $8, $8, 16392
# CHECK-NEXT: lw $8, -32716($gp)
-#
-# CHECK: SYMBOL TABLE:
-# CHECK: 00024008 .data 00000000 .hidden bar
-# CHECK: 00000000 *UND* 00000000 foo
# GOT: There are no relocations in this file.
Modified: lld/trunk/test/ELF/mips-gp-disp.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-gp-disp.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-gp-disp.s (original)
+++ lld/trunk/test/ELF/mips-gp-disp.s Thu Oct 3 15:01:08 2019
@@ -17,14 +17,14 @@
# INT-SO: 00000000 0 NOTYPE LOCAL HIDDEN ABS _gp_disp
# EXT-SO: 00020000 0 NOTYPE GLOBAL DEFAULT 9 _gp_disp
+# DIS: 00037ff0 .got 00000000 .hidden _gp
+# DIS: 00002000 .text 00000000 __start
# DIS: Disassembly of section .text:
# DIS-EMPTY:
# DIS-NEXT: __start:
# DIS-NEXT: lui $8, 3
# DIS-NEXT: addi $8, $8, 24560
# ^-- (_gp - __start) & 0xffff
-# DIS: 00037ff0 .got 00000000 .hidden _gp
-# DIS: 00002000 .text 00000000 __start
# REL: There are no relocations in this file
Modified: lld/trunk/test/ELF/mips-gp-ext.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-gp-ext.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-gp-ext.s (original)
+++ lld/trunk/test/ELF/mips-gp-ext.s Thu Oct 3 15:01:08 2019
@@ -25,6 +25,10 @@
# RUN: ld.lld -shared -o %t.abs.so --script %t.abs.script %t.o
# RUN: llvm-objdump -s -t %t.abs.so | FileCheck --check-prefix=ABS %s
+# REL: 000000e0 .text 00000000 foo
+# REL: 00000000 *ABS* 00000000 .hidden _gp_disp
+# REL: 000001ec *ABS* 00000000 .hidden _gp
+
# REL: Contents of section .reginfo:
# REL-NEXT: 0018 10000104 00000000 00000000 00000000
# REL-NEXT: 0028 00000000 000001ec
@@ -42,9 +46,9 @@
# ^-- 0x30-0x1ec
# foo - GP
-# REL: 000000e0 .text 00000000 foo
-# REL: 00000000 *ABS* 00000000 .hidden _gp_disp
-# REL: 000001ec *ABS* 00000000 .hidden _gp
+# ABS: 000000e0 .text 00000000 foo
+# ABS: 00000000 *ABS* 00000000 .hidden _gp_disp
+# ABS: 00000200 *ABS* 00000000 .hidden _gp
# ABS: Contents of section .reginfo:
# ABS-NEXT: 0018 10000104 00000000 00000000 00000000
@@ -63,10 +67,6 @@
# ^-- 0xe0-0x200
# foo - GP
-# ABS: 000000e0 .text 00000000 foo
-# ABS: 00000000 *ABS* 00000000 .hidden _gp_disp
-# ABS: 00000200 *ABS* 00000000 .hidden _gp
-
.text
foo:
lui $t0, %hi(_gp_disp)
Modified: lld/trunk/test/ELF/mips-gp-local.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-gp-local.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-gp-local.s (original)
+++ lld/trunk/test/ELF/mips-gp-local.s Thu Oct 3 15:01:08 2019
@@ -9,13 +9,13 @@
# RUN: ld.lld --script %t.script -o %t.exe %t.o
# RUN: llvm-objdump -d -t --no-show-raw-insn %t.exe | FileCheck %s
+# CHECK: 00037ff0 .got 00000000 .hidden _gp
+# CHECK: 00011000 .text 00000000 __start
+
# CHECK: __start:
# CHECK-NEXT: lui $8, 3
# CHECK-NEXT: addi $8, $8, 32752
-# CHECK: 00037ff0 .got 00000000 .hidden _gp
-# CHECK: 00011000 .text 00000000 __start
-
.text
.globl __start
__start:
Modified: lld/trunk/test/ELF/mips-gprel32-relocs-gp0.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-gprel32-relocs-gp0.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-gprel32-relocs-gp0.s (original)
+++ lld/trunk/test/ELF/mips-gprel32-relocs-gp0.s Thu Oct 3 15:01:08 2019
@@ -14,16 +14,16 @@
# REL: GP: 0x0
-# DUMP: Contents of section .rodata:
-# DUMP: 1000 fffffff4 fffffff8
-# ^ 0x20004 + 0x7ff0 - 0x28000
-# ^ 0x20008 + 0x7ff0 - 0x28000
-
# DUMP: SYMBOL TABLE:
# DUMP: 00020008 .text 00000000 bar
# DUMP: 00020004 .text 00000000 foo
# DUMP: 00028000 .got 00000000 .hidden _gp
+# DUMP: Contents of section .rodata:
+# DUMP: 1000 fffffff4 fffffff8
+# ^ 0x20004 + 0x7ff0 - 0x28000
+# ^ 0x20008 + 0x7ff0 - 0x28000
+
.text
.global __start
__start:
Modified: lld/trunk/test/ELF/mips-gprel32-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-gprel32-relocs.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-gprel32-relocs.s (original)
+++ lld/trunk/test/ELF/mips-gprel32-relocs.s Thu Oct 3 15:01:08 2019
@@ -23,12 +23,12 @@ v1:
.gpword foo
.gpword bar
-# CHECK: Contents of section .rodata:
-# CHECK: 1000 ffff8004 ffff8008
-# ^ 0x20004 - 0x28000
-# ^ 0x20008 - 0x28000
-
# CHECK: SYMBOL TABLE:
# CHECK: 00020008 .text 00000000 bar
# CHECK: 00020004 .text 00000000 foo
# CHECK: 00028000 .got 00000000 .hidden _gp
+
+# CHECK: Contents of section .rodata:
+# CHECK: 1000 ffff8004 ffff8008
+# ^ 0x20004 - 0x28000
+# ^ 0x20008 - 0x28000
Modified: lld/trunk/test/ELF/mips-hilo-gp-disp.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-hilo-gp-disp.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-hilo-gp-disp.s (original)
+++ lld/trunk/test/ELF/mips-hilo-gp-disp.s Thu Oct 3 15:01:08 2019
@@ -23,6 +23,11 @@ bar:
lui $t0,%hi(_gp_disp)
addi $t0,$t0,%lo(_gp_disp)
+# CHECK: SYMBOL TABLE:
+# CHECK: 0001100c .text 00000000 bar
+# CHECK: 00037ff0 .got 00000000 .hidden _gp
+# CHECK: 00011000 .text 00000000 __start
+
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# CHECK-NEXT: __start:
@@ -35,8 +40,3 @@ bar:
# ^-- %hi(0x37ff0-0x1100c)
# CHECK-NEXT: 11010: addi $8, $8, 28644
# ^-- %lo(0x37ff0-0x11010+4)
-
-# CHECK: SYMBOL TABLE:
-# CHECK: 0001100c .text 00000000 bar
-# CHECK: 00037ff0 .got 00000000 .hidden _gp
-# CHECK: 00011000 .text 00000000 __start
Modified: lld/trunk/test/ELF/mips-hilo-hi-only.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-hilo-hi-only.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-hilo-hi-only.s (original)
+++ lld/trunk/test/ELF/mips-hilo-hi-only.s Thu Oct 3 15:01:08 2019
@@ -15,12 +15,12 @@ _label:
# WARN: can't find matching R_MIPS_LO16 relocation for R_MIPS_HI16
+# CHECK: SYMBOL TABLE:
+# CHECK: 00020{{0*}}[[VAL:[0-9a-f]+]] .text 00000000 _label
+# CHECK: 00020{{.*}} .text 00000000 __start
+
# CHECK: __start:
# CHECK-NEXT: lui $8, 0x3
# ^-- %hi(__start) w/o addend
-# CHECK-NEXT: addi $8, $8, 0x[[VAL:[0-9a-f]+]]
+# CHECK-NEXT: addi $8, $8, 0x[[VAL]]
# ^-- %lo(_label)
-
-# CHECK: SYMBOL TABLE:
-# CHECK: 00020{{0*}}[[VAL]] .text 00000000 _label
-# CHECK: 00020{{.*}} .text 00000000 __start
Modified: lld/trunk/test/ELF/mips-hilo.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-hilo.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-hilo.s (original)
+++ lld/trunk/test/ELF/mips-hilo.s Thu Oct 3 15:01:08 2019
@@ -30,6 +30,11 @@ l1:
g1:
.word 0
+# CHECK: SYMBOL TABLE:
+# CHECK: 0021020 l O .data 00000004 l1
+# CHECK: 0021000 .text 00000000 __start
+# CHECK: 0021024 g O .data 00000004 g1
+
# CHECK: __start:
# CHECK-NEXT: 21000: lui $8, 2
# ^-- %hi(__start+4)
@@ -45,8 +50,3 @@ g1:
# ^-- %hi(l1+0x20000-4)
# CHECK-NEXT: 21018: addi $8, $8, 4124
# ^-- %lo(l1-4)
-
-# CHECK: SYMBOL TABLE:
-# CHECK: 0021020 l O .data 00000004 l1
-# CHECK: 0021000 .text 00000000 __start
-# CHECK: 0021024 g O .data 00000004 g1
Modified: lld/trunk/test/ELF/mips-mgot.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-mgot.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-mgot.s (original)
+++ lld/trunk/test/ELF/mips-mgot.s Thu Oct 3 15:01:08 2019
@@ -14,20 +14,20 @@
# RUN: llvm-objdump -s -section=.got -t %t.so | FileCheck %s
# RUN: llvm-readobj -r --dyn-syms -A %t.so | FileCheck -check-prefix=GOT %s
+# CHECK: SYMBOL TABLE:
+# CHECK: 00000000 l O .tdata 00000000 loc0
+# CHECK: [[FOO0:[0-9a-f]+]] .text 00000000 foo0
+# CHECK: 00000000 g O .tdata 00000000 tls0
+# CHECK: 00000004 g O .tdata 00000000 tls1
+# CHECK: [[FOO2:[0-9a-f]+]] .text 00000000 foo2
+
# CHECK: Contents of section .got:
-# CHECK-NEXT: 70000 00000000 80000000 [[FOO0:[0-9a-f]+]] [[FOO2:[0-9a-f]+]]
+# CHECK-NEXT: 70000 00000000 80000000 [[FOO0]] [[FOO2]]
# CHECK-NEXT: 70010 00000000 00000004 00010000 00020000
# CHECK-NEXT: 70020 00030000 00040000 00050000 00060000
# CHECK-NEXT: 70030 00000000 00000000 00000000 00000000
# CHECK-NEXT: 70040 00000000 00000000 00000000
-# CHECK: SYMBOL TABLE:
-# CHECK: 00000000 l O .tdata 00000000 loc0
-# CHECK: [[FOO0]] .text 00000000 foo0
-# CHECK: 00000000 g O .tdata 00000000 tls0
-# CHECK: 00000004 g O .tdata 00000000 tls1
-# CHECK: [[FOO2]] .text 00000000 foo2
-
# GOT: Relocations [
# GOT-NEXT: Section (7) .rel.dyn {
# GOT-NEXT: 0x70018 R_MIPS_REL32 - 0x0
Modified: lld/trunk/test/ELF/mips-micro-cross-calls.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-micro-cross-calls.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-micro-cross-calls.s (original)
+++ lld/trunk/test/ELF/mips-micro-cross-calls.s Thu Oct 3 15:01:08 2019
@@ -14,31 +14,31 @@
# RUN: --no-show-raw-insn --print-imm-hex %t-eb.exe \
# RUN: | FileCheck --check-prefixes=SYM,MICRO %s
+# REG: {{0*}}[[FOOT:[0-9a-f]+]] l F .text 0000000e 0x80 __microLA25Thunk_foo
+# REG: {{0*}}[[BAR:[0-9a-f]+]] g F .text 00000000 bar
+# REG: {{0*}}[[MIC:[0-9a-f]+]] .text 00000000 0x80 micro
+
# REG: __start:
-# REG-NEXT: jalx 0x[[MIC:[0-9a-f]+]] <micro>
+# REG-NEXT: jalx 0x[[MIC]] <micro>
# REG-NEXT: nop
-# REG-NEXT: jalx 0x[[FOOT:[0-9a-f]+]] <__microLA25Thunk_foo>
+# REG-NEXT: jalx 0x[[FOOT]] <__microLA25Thunk_foo>
# REG: __LA25Thunk_bar:
# REG-NEXT: lui $25, 0x2
-# REG-NEXT: j 0x[[BAR:[0-9a-f]+]] <bar>
+# REG-NEXT: j 0x[[BAR]] <bar>
+
+# MICRO: {{0*}}[[BART:[0-9a-f]+]] l F .text 00000010 __LA25Thunk_bar
+# MICRO: {{0*}}[[START:[0-9a-f]+]] .text 00000000 __start
+# MICRO: {{0*}}[[FOO:[0-9a-f]+]] g F .text 00000000 0x80 foo
# MICRO: micro:
-# MICRO-NEXT: jalx 0x[[START:[0-9a-f]+]]
+# MICRO-NEXT: jalx 0x[[START]]
# MICRO-NEXT: nop
-# MICRO-NEXT: jalx 0x[[BART:[0-9a-f]+]]
+# MICRO-NEXT: jalx 0x[[BART]]
# MICRO: __microLA25Thunk_foo:
# MICRO-NEXT: lui $25, 0x2
-# MICRO-NEXT: j 0x[[FOO:[0-9a-f]+]] <foo>
-
-# REG: [[FOOT]] l F .text 0000000e 0x80 __microLA25Thunk_foo
-# REG: [[BAR]] g F .text 00000000 bar
-# REG: [[MIC]] .text 00000000 0x80 micro
-
-# MICRO: [[BART]] l F .text 00000010 __LA25Thunk_bar
-# MICRO: [[START]] .text 00000000 __start
-# MICRO: [[FOO]] g F .text 00000000 0x80 foo
+# MICRO-NEXT: j 0x[[FOO]] <foo>
.text
.set nomicromips
Modified: lld/trunk/test/ELF/mips-micro-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-micro-relocs.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-micro-relocs.s (original)
+++ lld/trunk/test/ELF/mips-micro-relocs.s Thu Oct 3 15:01:08 2019
@@ -25,16 +25,9 @@
# RUN: | FileCheck --check-prefixes=ASM,EL %s
# RUN: llvm-readelf -h %tel.exe | FileCheck --check-prefix=ELF %s
-# ASM: __start:
-# ASM-NEXT: 20110: lui $3, 1
-# ASM-NEXT: addiu $3, $3, 32495
-# ASM-NEXT: lw $3, -32744($gp)
-# ASM-NEXT: lw $3, -32744($3)
-# ASM-NEXT: beqz16 $6, -32
-# ASM-NEXT: sll $3, $fp, 0
-# ASM-NEXT: b16 -40
-# ASM-NEXT: nop
-# ASM-NEXT: b -44
+# ASM: 00038000 .got 00000000 .hidden _gp
+# ASM: 00020100 g F .text 00000000 0x80 foo
+# ASM: 00020110 .text 00000000 0x80 __start
# EB: Contents of section .data:
# EB-NEXT: 30000 fffe8111
@@ -48,9 +41,16 @@
# EL: Contents of section .debug_info
# EL-NEXT: 0000 11010200
-# ASM: 00038000 .got 00000000 .hidden _gp
-# ASM: 00020100 g F .text 00000000 0x80 foo
-# ASM: 00020110 .text 00000000 0x80 __start
+# ASM: __start:
+# ASM-NEXT: 20110: lui $3, 1
+# ASM-NEXT: addiu $3, $3, 32495
+# ASM-NEXT: lw $3, -32744($gp)
+# ASM-NEXT: lw $3, -32744($3)
+# ASM-NEXT: beqz16 $6, -32
+# ASM-NEXT: sll $3, $fp, 0
+# ASM-NEXT: b16 -40
+# ASM-NEXT: nop
+# ASM-NEXT: b -44
# ELF: Entry point address: 0x20111
Modified: lld/trunk/test/ELF/mips-micror6-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-micror6-relocs.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-micror6-relocs.s (original)
+++ lld/trunk/test/ELF/mips-micror6-relocs.s Thu Oct 3 15:01:08 2019
@@ -20,14 +20,14 @@
# RUN: llvm-objdump -d -t -mattr=micromips --no-show-raw-insn %tel.exe \
# RUN: | FileCheck %s
+# CHECK: 00020100 g F .text 00000000 0x80 foo
+# CHECK: 00020110 .text 00000000 0x80 __start
+
# CHECK: __start:
# CHECK-NEXT: 20110: lapc $2, -12
# CHECK-NEXT: beqzc $3, -36
# CHECK-NEXT: balc -24 <foo>
-# CHECK: 00020100 g F .text 00000000 0x80 foo
-# CHECK: 00020110 .text 00000000 0x80 __start
-
.text
.set micromips
.global __start
Modified: lld/trunk/test/ELF/mips-n32-rels.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-n32-rels.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-n32-rels.s (original)
+++ lld/trunk/test/ELF/mips-n32-rels.s Thu Oct 3 15:01:08 2019
@@ -26,6 +26,14 @@ loc:
.section .rodata,"a", at progbits
.gpword(loc) # R_MIPS_GPREL32
+# CHECK: 00020104 .text 00000000 loc
+# CHECK: 00028100 .got 00000000 .hidden _gp
+# CHECK: 00020100 g F .text 00000000 __start
+
+# CHECK: Contents of section .rodata:
+# CHECK-NEXT: {{[0-9a-f]+}} ffff8004
+# ^-- loc - _gp
+
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# CHECK-NEXT: __start:
@@ -39,14 +47,6 @@ loc:
# ^-- 0 - 0xffff8000
# ^-- %lo(0x8000)
-# CHECK: Contents of section .rodata:
-# CHECK-NEXT: {{[0-9a-f]+}} ffff8004
-# ^-- loc - _gp
-
-# CHECK: 00020104 .text 00000000 loc
-# CHECK: 00028100 .got 00000000 .hidden _gp
-# CHECK: 00020100 g F .text 00000000 __start
-
# ELF: Class: ELF32
# ELF: Data: 2's complement, big endian
# ELF: Version: 1 (current)
Modified: lld/trunk/test/ELF/mips-nonalloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-nonalloc.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-nonalloc.s (original)
+++ lld/trunk/test/ELF/mips-nonalloc.s Thu Oct 3 15:01:08 2019
@@ -7,11 +7,12 @@
# RUN: ld.lld %t1.o %t2.o -o %t.exe
# RUN: llvm-objdump -t -s %t.exe | FileCheck %s
+# CHECK: [[SYM:[0-9a-f]+]] .text 00000000 __start
+
# CHECK: Contents of section .debug_info:
-# CHECK-NEXT: 0000 ffffffff [[SYM:[0-9a-f]+]] [[SYM]]
-# ^------------------^-- __start
+# CHECK-NEXT: 0000 ffffffff [[SYM]] [[SYM]]
+# ^-------^-- __start
-# CHECK: [[SYM]] .text 00000000 __start
.global __start
__start:
Modified: lld/trunk/test/ELF/mips-pc-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-pc-relocs.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-pc-relocs.s (original)
+++ lld/trunk/test/ELF/mips-pc-relocs.s Thu Oct 3 15:01:08 2019
@@ -26,6 +26,13 @@ __start:
.data
.word _foo+8-. # R_MIPS_PC32
+# CHECK: 00020000 .text 00000000 __start
+# CHECK: 00020020 .text 00000000 _foo
+
+# CHECK: Contents of section .data:
+# CHECK-NEXT: 30000 ffff0028 00000000 00000000 00000000
+# ^-- 0x20020 + 8 - 0x30000
+
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# CHECK-NEXT: __start:
@@ -41,10 +48,3 @@ __start:
# ^-- %hi(0x20020-0x20010)
# CHECK-NEXT: 20014: addiu $2, $2, 12
# ^-- %lo(0x20020-0x20014)
-
-# CHECK: Contents of section .data:
-# CHECK-NEXT: 30000 ffff0028 00000000 00000000 00000000
-# ^-- 0x20020 + 8 - 0x30000
-
-# CHECK: 00020000 .text 00000000 __start
-# CHECK: 00020020 .text 00000000 _foo
Modified: lld/trunk/test/ELF/mips-tls-64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-tls-64.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-tls-64.s (original)
+++ lld/trunk/test/ELF/mips-tls-64.s Thu Oct 3 15:01:08 2019
@@ -21,12 +21,9 @@
# RUN: | FileCheck -check-prefix=DIS-SO %s
# RUN: llvm-readobj -r -A %t-out.so | FileCheck -check-prefix=SO %s
-# DIS: __start:
-# DIS-NEXT: addiu $2, $3, -32720
-# DIS-NEXT: addiu $2, $3, -32736
-# DIS-NEXT: addiu $2, $3, -32704
-# DIS-NEXT: addiu $2, $3, -32688
-# DIS-NEXT: addiu $2, $3, -32728
+# DIS: 0000000000000000 l O .tdata 00000000 loc
+# DIS: 0000000000000004 g O .tdata 00000000 bar
+# DIS: 0000000000000000 g O *UND* 00000000 foo
# DIS: Contents of section .got:
# DIS-NEXT: 30000 00000000 00000000 80000000 00000000
@@ -35,9 +32,12 @@
# DIS-NEXT: 30030 00000000 00000001 00000000 00000000
# DIS-NEXT: 30040 00000000 00000001 ffffffff ffff8004
-# DIS: 0000000000000000 l O .tdata 00000000 loc
-# DIS: 0000000000000004 g O .tdata 00000000 bar
-# DIS: 0000000000000000 g O *UND* 00000000 foo
+# DIS: __start:
+# DIS-NEXT: addiu $2, $3, -32720
+# DIS-NEXT: addiu $2, $3, -32736
+# DIS-NEXT: addiu $2, $3, -32704
+# DIS-NEXT: addiu $2, $3, -32688
+# DIS-NEXT: addiu $2, $3, -32728
# CHECK: Relocations [
# CHECK-NEXT: Section (7) .rel.dyn {
Modified: lld/trunk/test/ELF/mips-tls-hilo.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-tls-hilo.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-tls-hilo.s (original)
+++ lld/trunk/test/ELF/mips-tls-hilo.s Thu Oct 3 15:01:08 2019
@@ -10,6 +10,8 @@
# RUN: ld.lld %t.o -shared -o %t.so
# RUN: llvm-readobj -r -A %t.so | FileCheck -check-prefix=SO %s
+# DIS: 00000000 l O .tdata 00000000 loc0
+
# DIS: __start:
# DIS-NEXT: addiu $2, $3, 0
# ^-- %hi(loc0 - .tdata - 0x8000)
@@ -20,8 +22,6 @@
# DIS-NEXT: addiu $2, $3, -28672
# ^-- %lo(loc0 - .tdata - 0x7000)
-# DIS: 00000000 l O .tdata 00000000 loc0
-
# CHECK: Relocations [
# CHECK-NEXT: ]
# CHECK-NOT: Primary GOT
Modified: lld/trunk/test/ELF/mips-tls-static-64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-tls-static-64.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-tls-static-64.s (original)
+++ lld/trunk/test/ELF/mips-tls-static-64.s Thu Oct 3 15:01:08 2019
@@ -6,13 +6,13 @@
# RUN: ld.lld -static %t -o %t.exe
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s
+# CHECK: SYMBOL TABLE:
+# CHECK: [[TGA:[0-9a-f]{8}]] .text 00000000 __tls_get_addr
+# CHECK: 0000000000000000 g O .tdata 00000000 tls1
+#
# CHECK: Contents of section .data:
-# CHECK-NEXT: {{.*}} [[TGA:[0-9a-f]+]] ffffffff ffff8004 ffffffff
+# CHECK-NEXT: {{.*}} [[TGA]] ffffffff ffff8004 ffffffff
# CHECK-NEXT: {{.*}} ffff9004
-#
-# CHECK: SYMBOL TABLE:
-# CHECK: [[TGA]] .text 00000000 __tls_get_addr
-# CHECK: 0000000000000000 g O .tdata 00000000 tls1
.text
.global __start
Modified: lld/trunk/test/ELF/mips-tls-static.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-tls-static.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-tls-static.s (original)
+++ lld/trunk/test/ELF/mips-tls-static.s Thu Oct 3 15:01:08 2019
@@ -6,15 +6,15 @@
# RUN: ld.lld -static %t -o %t.exe
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s
+# CHECK: SYMBOL TABLE:
+# CHECK: [[TGA:[0-9a-f]+]] .text 00000000 __tls_get_addr
+# CHECK: 00000000 g O .tdata 00000000 tls1
+#
# CHECK: Contents of section .data:
-# CHECK-NEXT: {{.*}} [[TGA:[0-9a-f]+]] ffff8004 ffff9004
+# CHECK-NEXT: {{.*}} [[TGA]] ffff8004 ffff9004
# CHECK: Contents of section .got:
# CHECK-NEXT: {{.*}} 00000000 80000000 ffff9000 00000001
# CHECK-NEXT: {{.*}} ffff8000 00000001 00000000
-#
-# CHECK: SYMBOL TABLE:
-# CHECK: [[TGA]] .text 00000000 __tls_get_addr
-# CHECK: 00000000 g O .tdata 00000000 tls1
.text
.global __start
Modified: lld/trunk/test/ELF/mips-tls.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-tls.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-tls.s (original)
+++ lld/trunk/test/ELF/mips-tls.s Thu Oct 3 15:01:08 2019
@@ -21,21 +21,21 @@
# RUN: | FileCheck -check-prefix=DIS-SO %s
# RUN: llvm-readobj -r -A %t-out.so | FileCheck -check-prefix=SO %s
-# DIS: __start:
-# DIS-NEXT: addiu $2, $3, -32736
-# DIS-NEXT: addiu $2, $3, -32744
-# DIS-NEXT: addiu $2, $3, -32728
-# DIS-NEXT: addiu $2, $3, -32720
-# DIS-NEXT: addiu $2, $3, -32740
+# DIS: 00000000 l O .tdata 00000000 loc
+# DIS: 00000004 g O .tdata 00000000 bar
+# DIS: 00000000 g O *UND* 00000000 foo
# DIS: Contents of section .got:
# DIS-NEXT: 30000 00000000 80000000 00000000 ffff9004
# DIS-NEXT: 30010 00000000 00000000 00000001 00000000
# DIS-NEXT: 30020 00000001 ffff8004
-# DIS: 00000000 l O .tdata 00000000 loc
-# DIS: 00000004 g O .tdata 00000000 bar
-# DIS: 00000000 g O *UND* 00000000 foo
+# DIS: __start:
+# DIS-NEXT: addiu $2, $3, -32736
+# DIS-NEXT: addiu $2, $3, -32744
+# DIS-NEXT: addiu $2, $3, -32728
+# DIS-NEXT: addiu $2, $3, -32720
+# DIS-NEXT: addiu $2, $3, -32740
# CHECK: Relocations [
# CHECK-NEXT: Section (7) .rel.dyn {
Modified: lld/trunk/test/ELF/msp430.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/msp430.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/msp430.s (original)
+++ lld/trunk/test/ELF/msp430.s Thu Oct 3 15:01:08 2019
@@ -6,6 +6,17 @@
;; Check handling of basic msp430 relocation types.
+ .data
+;; R_MSP430_8
+ .byte _byte
+;; R_MSP430_16
+ .word _start
+;; R_MSP430_32
+ .long _start
+
+; CHECK: Contents of section .data:
+; CHECK-NEXT: 2000 21008000 800000
+
.text
.global foo
foo:
@@ -29,16 +40,5 @@ foo:
; CHECK: 800a: {{.*}} mov #-1, -12
- .data
-;; R_MSP430_8
- .byte _byte
-;; R_MSP430_16
- .word _start
-;; R_MSP430_32
- .long _start
-
-; CHECK: Contents of section .data:
-; CHECK-NEXT: 2000 21008000 800000
-
; RUN: od -x %t.exe | FileCheck -check-prefix=TRAP %s
; TRAP: 4343 4343 4343 4343 4343 4343 4343 4343
Modified: lld/trunk/test/ELF/non-alloc-link-order-gc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/non-alloc-link-order-gc.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/non-alloc-link-order-gc.s (original)
+++ lld/trunk/test/ELF/non-alloc-link-order-gc.s Thu Oct 3 15:01:08 2019
@@ -5,14 +5,14 @@
## Check that we are able to GC non-allocatable metadata sections without crash.
+# CHECK: Name Size
+# CHECK: .stack_sizes 00000001
+
# CHECK: Disassembly of section .stack_sizes:
# CHECK-EMPTY:
# CHECK-NEXT: .stack_sizes:
# CHECK-NEXT: 01
-# CHECK: Name Size
-# CHECK: .stack_sizes 00000001
-
.section .text.live,"ax", at progbits
.globl live
live:
Modified: lld/trunk/test/ELF/relocation-common.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-common.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-common.s (original)
+++ lld/trunk/test/ELF/relocation-common.s Thu Oct 3 15:01:08 2019
@@ -10,5 +10,5 @@ _start:
.global sym1
.comm sym1,4,4
-# CHECK: 201158: {{.*}} movl $1, 4098(%rip)
# CHECK: 0000000000202164 g O .bss 00000004 sym1
+# CHECK: 201158: {{.*}} movl $1, 4098(%rip)
Modified: lld/trunk/test/ELF/relocation.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation.s (original)
+++ lld/trunk/test/ELF/relocation.s Thu Oct 3 15:01:08 2019
@@ -46,6 +46,39 @@
// SEC-NEXT: EntrySize: 0
// SEC-NEXT: }
+.section .R_X86_64_64,"a", at progbits
+.global R_X86_64_64
+R_X86_64_64:
+ .quad R_X86_64_64
+
+// CHECK: Contents of section .R_X86_64_64:
+// CHECK-NEXT: 2002f8 f8022000 00000000
+
+.section .R_X86_64_GOTPCREL,"a", at progbits
+.global R_X86_64_GOTPCREL
+R_X86_64_GOTPCREL:
+ .long zed at gotpcrel
+
+// 0x202460(.got) - 0x200300(.R_X86_64_GOTPCREL) = 0x2160
+// CHECK: Contents of section .R_X86_64_GOTPCREL
+// CHECK-NEXT: 200300 60210000
+
+.section .R_X86_64_GOT32,"a", at progbits
+.global R_X86_64_GOT32
+R_X86_64_GOT32:
+ .long zed at got
+
+// CHECK: Contents of section .R_X86_64_GOT32:
+// CHECK-NEXT: f8efffff
+
+
+// CHECK: Contents of section .R_X86_64_GOT64:
+// CHECK-NEXT: f8efffff ffffffff
+.section .R_X86_64_GOT64,"a", at progbits
+.global R_X86_64_GOT64
+R_X86_64_GOT64:
+ .quad zed at got
+
.section .text,"ax", at progbits,unique,1
.global _start
_start:
@@ -111,36 +144,3 @@ R_X86_64_32S_2:
// CHECK-EMPTY:
// CHECK-NEXT: R_X86_64_32S_2:
// CHECK-NEXT: 201331: {{.*}} movl 2102112, %eax
-
-.section .R_X86_64_64,"a", at progbits
-.global R_X86_64_64
-R_X86_64_64:
- .quad R_X86_64_64
-
-// CHECK: Contents of section .R_X86_64_64:
-// CHECK-NEXT: 2002f8 f8022000 00000000
-
-.section .R_X86_64_GOTPCREL,"a", at progbits
-.global R_X86_64_GOTPCREL
-R_X86_64_GOTPCREL:
- .long zed at gotpcrel
-
-// 0x202460(.got) - 0x200300(.R_X86_64_GOTPCREL) = 0x2160
-// CHECK: Contents of section .R_X86_64_GOTPCREL
-// CHECK-NEXT: 200300 60210000
-
-.section .R_X86_64_GOT32,"a", at progbits
-.global R_X86_64_GOT32
-R_X86_64_GOT32:
- .long zed at got
-
-// CHECK: Contents of section .R_X86_64_GOT32:
-// CHECK-NEXT: f8efffff
-
-
-// CHECK: Contents of section .R_X86_64_GOT64:
-// CHECK-NEXT: f8efffff ffffffff
-.section .R_X86_64_GOT64,"a", at progbits
-.global R_X86_64_GOT64
-R_X86_64_GOT64:
- .quad zed at got
Modified: lld/trunk/test/ELF/x86-64-retpoline-znow.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-retpoline-znow.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/x86-64-retpoline-znow.s (original)
+++ lld/trunk/test/ELF/x86-64-retpoline-znow.s Thu Oct 3 15:01:08 2019
@@ -6,6 +6,11 @@
// RUN: ld.lld -shared %t1.o %t2.so -o %t.exe -z retpolineplt -z now
// RUN: llvm-objdump -d -s --no-show-raw-insn %t.exe | FileCheck %s
+// CHECK: Contents of section .got.plt:
+// CHECK-NEXT: 23f0 10230000 00000000 00000000 00000000
+// CHECK-NEXT: 2400 00000000 00000000 00000000 00000000
+// CHECK-NEXT: 2410 00000000 00000000
+
// CHECK: Disassembly of section .plt:
// CHECK-EMPTY:
// CHECK-NEXT: .plt:
@@ -43,11 +48,6 @@
// CHECK-NEXT: int3
// CHECK-NEXT: int3
-// CHECK: Contents of section .got.plt:
-// CHECK-NEXT: 23f0 10230000 00000000 00000000 00000000
-// CHECK-NEXT: 2400 00000000 00000000 00000000 00000000
-// CHECK-NEXT: 2410 00000000 00000000
-
.global _start
_start:
jmp bar at PLT
Modified: lld/trunk/test/ELF/x86-64-retpoline.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-retpoline.s?rev=373671&r1=373670&r2=373671&view=diff
==============================================================================
--- lld/trunk/test/ELF/x86-64-retpoline.s (original)
+++ lld/trunk/test/ELF/x86-64-retpoline.s Thu Oct 3 15:01:08 2019
@@ -6,6 +6,11 @@
// RUN: ld.lld -shared %t1.o %t2.so -o %t.exe -z retpolineplt
// RUN: llvm-objdump -d -s --no-show-raw-insn %t.exe | FileCheck %s
+// CHECK: Contents of section .got.plt:
+// CHECK-NEXT: 3430 70230000 00000000 00000000 00000000
+// CHECK-NEXT: 3440 00000000 00000000 41130000 00000000
+// CHECK-NEXT: 3450 61130000 00000000
+
// CHECK: Disassembly of section .plt:
// CHECK-EMPTY:
// CHECK-NEXT: .plt:
@@ -56,11 +61,6 @@
// CHECK-NEXT: int3
// CHECK-NEXT: int3
-// CHECK: Contents of section .got.plt:
-// CHECK-NEXT: 3430 70230000 00000000 00000000 00000000
-// CHECK-NEXT: 3440 00000000 00000000 41130000 00000000
-// CHECK-NEXT: 3450 61130000 00000000
-
.global _start
_start:
jmp bar at PLT
More information about the llvm-commits
mailing list