[lld] r369344 - [ELF][AArch64] Allow PT_LOAD to have overlapping p_offset ranges
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 01:34:57 PDT 2019
Author: maskray
Date: Tue Aug 20 01:34:56 2019
New Revision: 369344
URL: http://llvm.org/viewvc/llvm-project?rev=369344&view=rev
Log:
[ELF][AArch64] Allow PT_LOAD to have overlapping p_offset ranges
Ported the D64906 technique to AArch64. It deletes 3 alignments at
PT_LOAD boundaries for the default case: the size of an aarch64 binary
decreases by at most 192kb.
If `sh_addralign(.tdata) < sh_addralign(.tbss)`,
we can potentially make `p_vaddr(PT_TLS)%p_align(PT_TLS) != 0`.
ld.so that are known to have problems if p_vaddr%p_align!=0:
* musl<=1.1.22
* FreeBSD 13.0-CURRENT (and before) rtld-elf arm64
New test aarch64-tls-vaddr-align.s checks that our workaround makes p_vaddr%p_align = 0.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D64930
Added:
lld/trunk/test/ELF/aarch64-tls-vaddr-align.s
Modified:
lld/trunk/ELF/Writer.cpp
lld/trunk/test/ELF/aarch64-abs16.s
lld/trunk/test/ELF/aarch64-abs32.s
lld/trunk/test/ELF/aarch64-call26-thunk.s
lld/trunk/test/ELF/aarch64-condb-reloc.s
lld/trunk/test/ELF/aarch64-copy.s
lld/trunk/test/ELF/aarch64-cortex-a53-843419-large.s
lld/trunk/test/ELF/aarch64-cortex-a53-843419-recognize.s
lld/trunk/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s
lld/trunk/test/ELF/aarch64-data-relocs.s
lld/trunk/test/ELF/aarch64-feature-bti.s
lld/trunk/test/ELF/aarch64-feature-btipac.s
lld/trunk/test/ELF/aarch64-feature-pac.s
lld/trunk/test/ELF/aarch64-fpic-got.s
lld/trunk/test/ELF/aarch64-gnu-ifunc-address.s
lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s
lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable2.s
lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s
lld/trunk/test/ELF/aarch64-gnu-ifunc.s
lld/trunk/test/ELF/aarch64-gnu-ifunc2.s
lld/trunk/test/ELF/aarch64-got-weak-undef.s
lld/trunk/test/ELF/aarch64-ifunc-bti.s
lld/trunk/test/ELF/aarch64-jump26-thunk.s
lld/trunk/test/ELF/aarch64-ldprel-lo19-invalid.s
lld/trunk/test/ELF/aarch64-lo12-alignment.s
lld/trunk/test/ELF/aarch64-load-alignment.s
lld/trunk/test/ELF/aarch64-nopic-plt.s
lld/trunk/test/ELF/aarch64-prel16.s
lld/trunk/test/ELF/aarch64-prel32.s
lld/trunk/test/ELF/aarch64-relative.s
lld/trunk/test/ELF/aarch64-relocs.s
lld/trunk/test/ELF/aarch64-relro.s
lld/trunk/test/ELF/aarch64-thunk-section-location.s
lld/trunk/test/ELF/aarch64-tls-gdie.s
lld/trunk/test/ELF/aarch64-tls-gdle.s
lld/trunk/test/ELF/aarch64-tls-ie.s
lld/trunk/test/ELF/aarch64-tls-le.s
lld/trunk/test/ELF/aarch64-tlsdesc.s
lld/trunk/test/ELF/aarch64-tlsld-ldst.s
lld/trunk/test/ELF/aarch64-tstbr14-reloc.s
lld/trunk/test/ELF/aarch64-undefined-weak.s
lld/trunk/test/ELF/basic-aarch64.s
lld/trunk/test/ELF/global-offset-table-position-aarch64.s
lld/trunk/test/ELF/pack-dyn-relocs-loop.s
lld/trunk/test/ELF/pack-dyn-relocs.s
lld/trunk/test/ELF/plt-aarch64.s
lld/trunk/test/ELF/pr34660.s
lld/trunk/test/ELF/relocation-b-aarch64.test
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Aug 20 01:34:56 2019
@@ -2219,7 +2219,8 @@ template <class ELFT> void Writer<ELFT>:
// and non-executable segments.
//
// TODO Enable this technique on all targets.
- bool enable = config->emachine == EM_PPC64;
+ bool enable =
+ config->emachine == EM_AARCH64 || config->emachine == EM_PPC64;
if (!enable || (config->zSeparateCode && prev &&
(prev->p_flags & PF_X) != (p->p_flags & PF_X)))
Modified: lld/trunk/test/ELF/aarch64-abs16.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-abs16.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-abs16.s (original)
+++ lld/trunk/test/ELF/aarch64-abs16.s Tue Aug 20 01:34:56 2019
@@ -14,11 +14,11 @@ _start:
// RUN: llvm-objdump -s -section=.data %t2 | FileCheck %s
// CHECK: Contents of section .data:
-// 210000: S = 0x100, A = 0xfeff
+// 220158: S = 0x100, A = 0xfeff
// S + A = 0xffff
-// 210002: S = 0x100, A = -0x8100
+// 22015c: S = 0x100, A = -0x8100
// S + A = 0x8000
-// CHECK-NEXT: 210000 ffff0080
+// CHECK-NEXT: 220158 ffff0080
// RUN: not ld.lld %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
// OVERFLOW1: relocation R_AARCH64_ABS16 out of range: -32769 is not in [-32768, 65535]
Modified: lld/trunk/test/ELF/aarch64-abs32.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-abs32.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-abs32.s (original)
+++ lld/trunk/test/ELF/aarch64-abs32.s Tue Aug 20 01:34:56 2019
@@ -14,11 +14,11 @@ _start:
// RUN: llvm-objdump -s -section=.data %t2 | FileCheck %s
// CHECK: Contents of section .data:
-// 210000: S = 0x100, A = 0xfffffeff
+// 220158: S = 0x100, A = 0xfffffeff
// S + A = 0xffffffff
-// 210004: S = 0x100, A = -0x80000100
+// 22015c: S = 0x100, A = -0x80000100
// S + A = 0x80000000
-// CHECK-NEXT: 210000 ffffffff 00000080
+// CHECK-NEXT: 220158 ffffffff 00000080
// RUN: not ld.lld %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
// OVERFLOW1: relocation R_AARCH64_ABS32 out of range: -2147483649 is not in [-2147483648, 4294967295]
Modified: lld/trunk/test/ELF/aarch64-call26-thunk.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-call26-thunk.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-call26-thunk.s (original)
+++ lld/trunk/test/ELF/aarch64-call26-thunk.s Tue Aug 20 01:34:56 2019
@@ -12,11 +12,11 @@ _start:
// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK-NEXT: _start:
-// CHECK-NEXT: 210000: 02 00 00 94 bl #8
+// CHECK-NEXT: 210120: 02 00 00 94 bl #8
// CHECK: __AArch64AbsLongThunk_big:
-// CHECK-NEXT: 210008: 50 00 00 58 ldr x16, #8
-// CHECK-NEXT: 21000c: 00 02 1f d6 br x16
+// CHECK-NEXT: 210128: 50 00 00 58 ldr x16, #8
+// CHECK-NEXT: 21012c: 00 02 1f d6 br x16
// CHECK: $d:
-// CHECK-NEXT: 210010: 00 00 00 00 .word 0x00000000
-// CHECK-NEXT: 210014: 10 00 00 00 .word 0x00000010
+// CHECK-NEXT: 210130: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 210134: 10 00 00 00 .word 0x00000010
Modified: lld/trunk/test/ELF/aarch64-condb-reloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-condb-reloc.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-condb-reloc.s (original)
+++ lld/trunk/test/ELF/aarch64-condb-reloc.s Tue Aug 20 01:34:56 2019
@@ -13,21 +13,21 @@
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# CHECK-NEXT: _foo:
-# CHECK-NEXT: 210000: nop
-# CHECK-NEXT: 210004: nop
-# CHECK-NEXT: 210008: nop
-# CHECK-NEXT: 21000c: nop
+# CHECK-NEXT: 210120: nop
+# CHECK-NEXT: 210124: nop
+# CHECK-NEXT: 210128: nop
+# CHECK-NEXT: 21012c: nop
# CHECK: _bar:
-# CHECK-NEXT: 210010: nop
-# CHECK-NEXT: 210014: nop
-# CHECK-NEXT: 210018: nop
+# CHECK-NEXT: 210130: nop
+# CHECK-NEXT: 210134: nop
+# CHECK-NEXT: 210138: nop
# CHECK: _dah:
-# CHECK-NEXT: 21001c: nop
-# CHECK-NEXT: 210020: nop
+# CHECK-NEXT: 21013c: nop
+# CHECK-NEXT: 210140: nop
# CHECK: _start:
-# CHECK-NEXT: 210024: b.eq #-36 <_foo>
-# CHECK-NEXT: 210028: b.eq #-24 <_bar>
-# CHECK-NEXT: 21002c: b.eq #-16 <_dah>
+# CHECK-NEXT: 210144: b.eq #-36 <_foo>
+# CHECK-NEXT: 210148: b.eq #-24 <_bar>
+# CHECK-NEXT: 21014c: b.eq #-16 <_dah>
#DSOREL: Section {
#DSOREL: Index:
@@ -37,8 +37,8 @@
#DSOREL-NEXT: SHF_ALLOC
#DSOREL-NEXT: SHF_WRITE
#DSOREL-NEXT: ]
-#DSOREL-NEXT: Address: 0x30000
-#DSOREL-NEXT: Offset: 0x30000
+#DSOREL-NEXT: Address: 0x30470
+#DSOREL-NEXT: Offset: 0x470
#DSOREL-NEXT: Size: 48
#DSOREL-NEXT: Link: 0
#DSOREL-NEXT: Info: 0
@@ -47,60 +47,60 @@
#DSOREL-NEXT: }
#DSOREL: Relocations [
#DSOREL-NEXT: Section ({{.*}}) .rela.plt {
-#DSOREL-NEXT: 0x30018 R_AARCH64_JUMP_SLOT _foo
-#DSOREL-NEXT: 0x30020 R_AARCH64_JUMP_SLOT _bar
-#DSOREL-NEXT: 0x30028 R_AARCH64_JUMP_SLOT _dah
+#DSOREL-NEXT: 0x30488 R_AARCH64_JUMP_SLOT _foo
+#DSOREL-NEXT: 0x30490 R_AARCH64_JUMP_SLOT _bar
+#DSOREL-NEXT: 0x30498 R_AARCH64_JUMP_SLOT _dah
#DSOREL-NEXT: }
#DSOREL-NEXT:]
#DSO: Disassembly of section .text:
#DSO-EMPTY:
#DSO-NEXT: _foo:
-#DSO-NEXT: 10000: nop
-#DSO-NEXT: 10004: nop
-#DSO-NEXT: 10008: nop
-#DSO-NEXT: 1000c: nop
+#DSO-NEXT: 10338: nop
+#DSO-NEXT: 1033c: nop
+#DSO-NEXT: 10340: nop
+#DSO-NEXT: 10344: nop
#DSO: _bar:
-#DSO-NEXT: 10010: nop
-#DSO-NEXT: 10014: nop
-#DSO-NEXT: 10018: nop
+#DSO-NEXT: 10348: nop
+#DSO-NEXT: 1034c: nop
+#DSO-NEXT: 10350: nop
#DSO: _dah:
-#DSO-NEXT: 1001c: nop
-#DSO-NEXT: 10020: nop
+#DSO-NEXT: 10354: nop
+#DSO-NEXT: 10358: nop
#DSO: _start:
-#DSO-NEXT: 10024: b.eq #44 <_foo at plt>
-#DSO-NEXT: 10028: b.eq #56 <_bar at plt>
-#DSO-NEXT: 1002c: b.eq #68 <_dah at plt>
+#DSO-NEXT: 1035c: b.eq #52 <_foo at plt>
+#DSO-NEXT: 10360: b.eq #64 <_bar at plt>
+#DSO-NEXT: 10364: b.eq #76 <_dah at plt>
#DSO-EMPTY:
#DSO-NEXT: Disassembly of section .plt:
#DSO-EMPTY:
#DSO-NEXT: .plt:
-#DSO-NEXT: 10030: stp x16, x30, [sp, #-16]!
-#DSO-NEXT: 10034: adrp x16, #131072
-#DSO-NEXT: 10038: ldr x17, [x16, #16]
-#DSO-NEXT: 1003c: add x16, x16, #16
-#DSO-NEXT: 10040: br x17
-#DSO-NEXT: 10044: nop
-#DSO-NEXT: 10048: nop
-#DSO-NEXT: 1004c: nop
+#DSO-NEXT: 10370: stp x16, x30, [sp, #-16]!
+#DSO-NEXT: 10374: adrp x16, #131072
+#DSO-NEXT: 10378: ldr x17, [x16, #1152]
+#DSO-NEXT: 1037c: add x16, x16, #1152
+#DSO-NEXT: 10380: br x17
+#DSO-NEXT: 10384: nop
+#DSO-NEXT: 10388: nop
+#DSO-NEXT: 1038c: nop
#DSO-EMPTY:
#DSO-NEXT: _foo at plt:
-#DSO-NEXT: 10050: adrp x16, #131072
-#DSO-NEXT: 10054: ldr x17, [x16, #24]
-#DSO-NEXT: 10058: add x16, x16, #24
-#DSO-NEXT: 1005c: br x17
+#DSO-NEXT: 10390: adrp x16, #131072
+#DSO-NEXT: 10394: ldr x17, [x16, #1160]
+#DSO-NEXT: 10398: add x16, x16, #1160
+#DSO-NEXT: 1039c: br x17
#DSO-EMPTY:
#DSO-NEXT: _bar at plt:
-#DSO-NEXT: 10060: adrp x16, #131072
-#DSO-NEXT: 10064: ldr x17, [x16, #32]
-#DSO-NEXT: 10068: add x16, x16, #32
-#DSO-NEXT: 1006c: br x17
+#DSO-NEXT: 103a0: adrp x16, #131072
+#DSO-NEXT: 103a4: ldr x17, [x16, #1168]
+#DSO-NEXT: 103a8: add x16, x16, #1168
+#DSO-NEXT: 103ac: br x17
#DSO-EMPTY:
#DSO-NEXT: _dah at plt:
-#DSO-NEXT: 10070: adrp x16, #131072
-#DSO-NEXT: 10074: ldr x17, [x16, #40]
-#DSO-NEXT: 10078: add x16, x16, #40
-#DSO-NEXT: 1007c: br x17
+#DSO-NEXT: 103b0: adrp x16, #131072
+#DSO-NEXT: 103b4: ldr x17, [x16, #1176]
+#DSO-NEXT: 103b8: add x16, x16, #1176
+#DSO-NEXT: 103bc: br x17
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-copy.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-copy.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-copy.s (original)
+++ lld/trunk/test/ELF/aarch64-copy.s Tue Aug 20 01:34:56 2019
@@ -22,7 +22,7 @@ _start:
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_WRITE
// CHECK-NEXT: ]
-// CHECK-NEXT: Address: 0x230000
+// CHECK-NEXT: Address: 0x2303F0
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link:
@@ -31,29 +31,29 @@ _start:
// CHECK: Relocations [
// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
-// CHECK-NEXT: 0x230000 R_AARCH64_COPY x 0x0
-// CHECK-NEXT: 0x230010 R_AARCH64_COPY y 0x0
-// CHECK-NEXT: 0x230014 R_AARCH64_COPY z 0x0
+// CHECK-NEXT: 0x2303F0 R_AARCH64_COPY x 0x0
+// CHECK-NEXT: 0x230400 R_AARCH64_COPY y 0x0
+// CHECK-NEXT: 0x230404 R_AARCH64_COPY z 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
// CHECK: Symbols [
// CHECK: Name: x
-// CHECK-NEXT: Value: 0x230000
+// CHECK-NEXT: Value: 0x2303F0
// CHECK-NEXT: Size: 4
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other:
// CHECK-NEXT: Section: .bss
// CHECK: Name: y
-// CHECK-NEXT: Value: 0x230010
+// CHECK-NEXT: Value: 0x230400
// CHECK-NEXT: Size: 4
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other:
// CHECK-NEXT: Section: .bss
// CHECK: Name: z
-// CHECK-NEXT: Value: 0x230014
+// CHECK-NEXT: Value: 0x230404
// CHECK-NEXT: Size: 4
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: Object
@@ -64,16 +64,13 @@ _start:
// CODE: Disassembly of section .text:
// CODE-EMPTY:
// CODE-NEXT: _start:
-// S(x) = 0x230000, A = 0, P = 0x210000
-// S + A - P = 0x20000 = 131072
-// CODE-NEXT: 210000: adr x1, #131072
-// S(y) = 0x230010, A = 0, P = 0x210004
-// Page(S + A) - Page(P) = 0x230000 - 0x210000 = 0x20000 = 131072
-// CODE-NEXT: 210004: adrp x2, #131072
-// S(y) = 0x230010, A = 0
-// (S + A) & 0xFFF = 0x10 = 16
-// CODE-NEXT: 210008: add x2, x2, #16
+// S + A - P = 0x2303f0 + 0 - 0x21031c = 131284
+// CODE-NEXT: 21031c: adr x1, #131284
+// Page(S + A) - Page(P) = Page(0x230400) - Page(0x210320) = 131072
+// CODE-NEXT: 210320: adrp x2, #131072
+// (S + A) & 0xFFF = (0x230400 + 0) & 0xFFF = 1024
+// CODE-NEXT: 210324: add x2, x2, #1024
// RODATA: Contents of section .rodata:
-// S(z) = 0x230014
-// RODATA-NEXT: 200318 14002300
+// S(z) = 0x230404
+// RODATA-NEXT: 200318 04042300
Modified: lld/trunk/test/ELF/aarch64-cortex-a53-843419-large.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-cortex-a53-843419-large.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-cortex-a53-843419-large.s (original)
+++ lld/trunk/test/ELF/aarch64-cortex-a53-843419-large.s Tue Aug 20 01:34:56 2019
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
-// RUN: ld.lld --fix-cortex-a53-843419 %t.o -o %t2
+// RUN: ld.lld --fix-cortex-a53-843419 -z separate-code %t.o -o %t2
// RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 -start-address=2162688 -stop-address=2162700 | FileCheck --check-prefix=CHECK1 %s
// RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 -start-address=2166784 -stop-address=2166788 | FileCheck --check-prefix=CHECK2 %s
// RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 -start-address=2170872 -stop-address=2170888 | FileCheck --check-prefix=CHECK3 %s
Modified: lld/trunk/test/ELF/aarch64-cortex-a53-843419-recognize.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-cortex-a53-843419-recognize.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-cortex-a53-843419-recognize.s (original)
+++ lld/trunk/test/ELF/aarch64-cortex-a53-843419-recognize.s Tue Aug 20 01:34:56 2019
@@ -1,8 +1,8 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
-// RUN: ld.lld -fix-cortex-a53-843419 -verbose %t.o -o %t2 2>&1 | FileCheck -check-prefix CHECK-PRINT %s
+// RUN: ld.lld -fix-cortex-a53-843419 -z separate-code -verbose %t.o -o %t2 2>&1 | FileCheck -check-prefix CHECK-PRINT %s
// RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 | FileCheck %s -check-prefixes=CHECK,CHECK-FIX
-// RUN: ld.lld %t.o -o %t3
+// RUN: ld.lld %t.o -z separate-code -o %t3
// RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t3 | FileCheck %s -check-prefixes=CHECK,CHECK-NOFIX
// Test cases for Cortex-A53 Erratum 843419
// See ARM-EPM-048406 Cortex_A53_MPCore_Software_Developers_Errata_Notice.pdf
@@ -85,7 +85,7 @@ t3_ffc_ldrpost:
// CHECK-NEXT: 217ff8: 40 02 00 b0 adrp x0, #299008
// CHECK-NEXT: 217ffc: 21 8c 00 bc str s1, [x1, #8]!
// CHECK-FIX: 218000: 09 b0 00 14 b #180260
-// CHECK-NOFIX: 218000: 02 00 40 f9 ldr x2, [x0]
+// CHECK-NOFIX: 218000: 02 0c 40 f9 ldr x2, [x0, #24]
// CHECK-NEXT: 218004: c0 03 5f d6 ret
.section .text.04, "ax", %progbits
.balign 4096
@@ -103,7 +103,7 @@ t3_ff8_strpre:
// CHECK-NEXT: 219ffc: 3c 02 00 f0 adrp x28, #290816
// CHECK-NEXT: 21a000: 42 00 00 f9 str x2, [x2]
// CHECK-FIX: 21a004: 0a a8 00 14 b #172072
-// CHECK-NOFIX: 21a004: 9c 07 00 f9 str x28, [x28, #8]
+// CHECK-NOFIX: 21a004: 9c 13 00 f9 str x28, [x28, #32]
// CHECK-NEXT: 21a008: c0 03 5f d6 ret
.section .text.05, "ax", %progbits
.balign 4096
@@ -121,7 +121,7 @@ t3_ffc_str:
// CHECK-NEXT: 21bffc: 3c 02 00 b0 adrp x28, #282624
// CHECK-NEXT: 21c000: 44 00 00 b9 str w4, [x2]
// CHECK-FIX: 21c004: 0c a0 00 14 b #163888
-// CHECK-NOFIX: 21c004: 84 0b 00 f9 str x4, [x28, #16]
+// CHECK-NOFIX: 21c004: 84 17 00 f9 str x4, [x28, #40]
// CHECK-NEXT: 21c008: c0 03 5f d6 ret
.section .text.06, "ax", %progbits
.balign 4096
@@ -192,7 +192,7 @@ t3_ffc_sturh:
// CHECK-NEXT: 223ff8: f2 01 00 b0 adrp x18, #249856
// CHECK-NEXT: 223ffc: e3 ff ff 58 ldr x3, #-4
// CHECK-FIX: 224000: 15 80 00 14 b #131156
-// CHECK-NOFIX: 224000: 52 02 40 f9 ldr x18, [x18]
+// CHECK-NOFIX: 224000: 52 0e 40 f9 ldr x18, [x18, #24]
// CHECK-NEXT: 224004: c0 03 5f d6 ret
.section .text.10, "ax", %progbits
.balign 4096
@@ -210,7 +210,7 @@ t3_ff8_literal:
// CHECK-NEXT: 225ffc: cf 01 00 f0 adrp x15, #241664
// CHECK-NEXT: 226000: 43 68 61 f8 ldr x3, [x2, x1]
// CHECK-FIX: 226004: 16 78 00 14 b #122968
-// CHECK-NOFIX: 226004: ea 05 40 f9 ldr x10, [x15, #8]
+// CHECK-NOFIX: 226004: ea 11 40 f9 ldr x10, [x15, #32]
// CHECK-NEXT: 226008: c0 03 5f d6 ret
.section .text.11, "ax", %progbits
.balign 4096
@@ -228,7 +228,7 @@ t3_ffc_register:
// CHECK-NEXT: 227ff8: d0 01 00 b0 adrp x16, #233472
// CHECK-NEXT: 227ffc: 61 08 00 a9 stp x1, x2, [x3]
// CHECK-FIX: 228000: 19 70 00 14 b #114788
-// CHECK-NOFIX: 228000: 0d 0a 40 f9 ldr x13, [x16, #16]
+// CHECK-NOFIX: 228000: 0d 16 40 f9 ldr x13, [x16, #40]
// CHECK-NEXT: 228004: c0 03 5f d6 ret
.section .text.12, "ax", %progbits
.balign 4096
@@ -246,7 +246,7 @@ t3_ff8_stp:
// CHECK-NEXT: 229ffc: a7 01 00 f0 adrp x7, #225280
// CHECK-NEXT: 22a000: 61 08 00 a8 stnp x1, x2, [x3]
// CHECK-FIX: 22a004: 1a 68 00 14 b #106600
-// CHECK-NOFIX: 22a004: e9 00 40 f9 ldr x9, [x7]
+// CHECK-NOFIX: 22a004: e9 0c 40 f9 ldr x9, [x7, #24]
// CHECK-NEXT: 22a008: c0 03 5f d6 ret
.section .text.13, "ax", %progbits
.balign 4096
@@ -264,7 +264,7 @@ t3_ffc_stnp:
// CHECK-NEXT: 22bffc: b7 01 00 b0 adrp x23, #217088
// CHECK-NEXT: 22c000: 20 04 82 0d st1 { v0.b }[1], [x1], x2
// CHECK-FIX: 22c004: 1c 60 00 14 b #98416
-// CHECK-NOFIX: 22c004: f6 06 40 f9 ldr x22, [x23, #8]
+// CHECK-NOFIX: 22c004: f6 12 40 f9 ldr x22, [x23, #32]
// CHECK-NEXT: 22c008: c0 03 5f d6 ret
.section .text.14, "ax", %progbits
.balign 4096
@@ -282,7 +282,7 @@ t3_ffc_st1singlepost:
// CHECK-NEXT: 22dff8: 97 01 00 f0 adrp x23, #208896
// CHECK-NEXT: 22dffc: 20 a0 00 4c st1 { v0.16b, v1.16b }, [x1]
// CHECK-FIX: 22e000: 1f 58 00 14 b #90236
-// CHECK-NOFIX: 22e000: f8 0a 40 f9 ldr x24, [x23, #16]
+// CHECK-NOFIX: 22e000: f8 16 40 f9 ldr x24, [x23, #40]
// CHECK-NEXT: 22e004: c0 03 5f d6 ret
.section .text.15, "ax", %progbits
.balign 4096
@@ -531,13 +531,13 @@ _start:
// CHECK-FIX-NEXT: 24401c: 03 08 40 f9 ldr x3, [x0, #16]
// CHECK-FIX-NEXT: 244020: fa 47 ff 17 b #-188440
// CHECK-FIX: __CortexA53843419_218000:
-// CHECK-FIX-NEXT: 244024: 02 00 40 f9 ldr x2, [x0]
+// CHECK-FIX-NEXT: 244024: 02 0c 40 f9 ldr x2, [x0, #24]
// CHECK-FIX-NEXT: 244028: f7 4f ff 17 b #-180260
// CHECK-FIX: __CortexA53843419_21A004:
-// CHECK-FIX-NEXT: 24402c: 9c 07 00 f9 str x28, [x28, #8]
+// CHECK-FIX-NEXT: 24402c: 9c 13 00 f9 str x28, [x28, #32]
// CHECK-FIX-NEXT: 244030: f6 57 ff 17 b #-172072
// CHECK-FIX: __CortexA53843419_21C004:
-// CHECK-FIX-NEXT: 244034: 84 0b 00 f9 str x4, [x28, #16]
+// CHECK-FIX-NEXT: 244034: 84 17 00 f9 str x4, [x28, #40]
// CHECK-FIX-NEXT: 244038: f4 5f ff 17 b #-163888
// CHECK-FIX: __CortexA53843419_21E000:
// CHECK-FIX-NEXT: 24403c: bd 03 40 f9 ldr x29, [x29]
@@ -549,22 +549,22 @@ _start:
// CHECK-FIX-NEXT: 24404c: 41 0a 40 f9 ldr x1, [x18, #16]
// CHECK-FIX-NEXT: 244050: ee 77 ff 17 b #-139336
// CHECK-FIX: __CortexA53843419_224000:
-// CHECK-FIX-NEXT: 244054: 52 02 40 f9 ldr x18, [x18]
+// CHECK-FIX-NEXT: 244054: 52 0e 40 f9 ldr x18, [x18, #24]
// CHECK-FIX-NEXT: 244058: eb 7f ff 17 b #-131156
// CHECK-FIX: __CortexA53843419_226004:
-// CHECK-FIX-NEXT: 24405c: ea 05 40 f9 ldr x10, [x15, #8]
+// CHECK-FIX-NEXT: 24405c: ea 11 40 f9 ldr x10, [x15, #32]
// CHECK-FIX-NEXT: 244060: ea 87 ff 17 b #-122968
// CHECK-FIX: __CortexA53843419_228000:
-// CHECK-FIX-NEXT: 244064: 0d 0a 40 f9 ldr x13, [x16, #16]
+// CHECK-FIX-NEXT: 244064: 0d 16 40 f9 ldr x13, [x16, #40]
// CHECK-FIX-NEXT: 244068: e7 8f ff 17 b #-114788
// CHECK-FIX: __CortexA53843419_22A004:
-// CHECK-FIX-NEXT: 24406c: e9 00 40 f9 ldr x9, [x7]
+// CHECK-FIX-NEXT: 24406c: e9 0c 40 f9 ldr x9, [x7, #24]
// CHECK-FIX-NEXT: 244070: e6 97 ff 17 b #-106600
// CHECK-FIX: __CortexA53843419_22C004:
-// CHECK-FIX-NEXT: 244074: f6 06 40 f9 ldr x22, [x23, #8]
+// CHECK-FIX-NEXT: 244074: f6 12 40 f9 ldr x22, [x23, #32]
// CHECK-FIX-NEXT: 244078: e4 9f ff 17 b #-98416
// CHECK-FIX: __CortexA53843419_22E000:
-// CHECK-FIX-NEXT: 24407c: f8 0a 40 f9 ldr x24, [x23, #16]
+// CHECK-FIX-NEXT: 24407c: f8 16 40 f9 ldr x24, [x23, #40]
// CHECK-FIX-NEXT: 244080: e1 a7 ff 17 b #-90236
// CHECK-FIX: __CortexA53843419_230004:
// CHECK-FIX-NEXT: 244084: 02 00 40 f9 ldr x2, [x0]
Modified: lld/trunk/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s (original)
+++ lld/trunk/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s Tue Aug 20 01:34:56 2019
@@ -24,12 +24,12 @@ _start:
ret
// CHECK: _start:
-// CHECK-NEXT: 210ff8: 41 d0 3b d5 mrs x1, TPIDR_EL0
-// CHECK-NEXT: 210ffc: 00 00 a0 d2 movz x0, #0, lsl #16
-// CHECK-NEXT: 211000: 01 02 80 f2 movk x1, #16
-// CHECK-NEXT: 211004: 00 00 a0 d2 movz x0, #0, lsl #16
-// CHECK-NEXT: 211008: 01 02 80 f2 movk x1, #16
-// CHECK-NEXT: 21100c: c0 03 5f d6 ret
+// CHECK-NEXT: 211ff8: 41 d0 3b d5 mrs x1, TPIDR_EL0
+// CHECK-NEXT: 211ffc: 00 00 a0 d2 movz x0, #0, lsl #16
+// CHECK-NEXT: 212000: 01 02 80 f2 movk x1, #16
+// CHECK-NEXT: 212004: 00 00 a0 d2 movz x0, #0, lsl #16
+// CHECK-NEXT: 212008: 01 02 80 f2 movk x1, #16
+// CHECK-NEXT: 21200c: c0 03 5f d6 ret
.type v, at object
.section .tbss,"awT", at nobits
Modified: lld/trunk/test/ELF/aarch64-data-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-data-relocs.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-data-relocs.s (original)
+++ lld/trunk/test/ELF/aarch64-data-relocs.s Tue Aug 20 01:34:56 2019
@@ -12,12 +12,11 @@ _start:
// S = 0x100, A = 0x24
// S + A = 0x124
// CHECK: Contents of section .R_AARCH64_ABS64:
-// CHECK-NEXT: 210000 24010000 00000000
+// CHECK-NEXT: 210120 24010000 00000000
.section .R_AARCH64_PREL64, "ax", at progbits
.xword foo - . + 0x24
-// S = 0x100, A = 0x24, P = 0x20008
-// S + A - P = 0xfffffffffffe011c
+// S + A - P = 0x100 + 0x24 - 0x210128 = 0xffffffffffdefffc
// CHECK: Contents of section .R_AARCH64_PREL64:
-// CHECK-NEXT: 210008 1c01dfff ffffffff
+// CHECK-NEXT: 210128 fcffdeff ffffffff
Modified: lld/trunk/test/ELF/aarch64-feature-bti.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-feature-bti.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-feature-bti.s (original)
+++ lld/trunk/test/ELF/aarch64-feature-bti.s Tue Aug 20 01:34:56 2019
@@ -16,33 +16,38 @@
# NOBTIDYN-NOT: 0x0000000070000001 (AARCH64_BTI_PLT)
# NOBTIDYN-NOT: 0x0000000070000003 (AARCH64_PAC_PLT)
-# NOBTI: 0000000000010000 func2:
-# NOBTI-NEXT: 10000: bl #48 <func3 at plt>
-# NOBTI-NEXT: 10004: ret
+# NOBTI: 00000000000102b8 func2:
+# NOBTI-NEXT: 102b8: bl #56 <func3 at plt>
+# NOBTI-NEXT: 102bc: ret
# NOBTI: Disassembly of section .plt:
-# NOBTI: 0000000000010010 .plt:
-# NOBTI-NEXT: 10010: stp x16, x30, [sp, #-16]!
-# NOBTI-NEXT: 10014: adrp x16, #131072
-# NOBTI-NEXT: 10018: ldr x17, [x16, #16]
-# NOBTI-NEXT: 1001c: add x16, x16, #16
-# NOBTI-NEXT: 10020: br x17
-# NOBTI-NEXT: 10024: nop
-# NOBTI-NEXT: 10028: nop
-# NOBTI-NEXT: 1002c: nop
-# NOBTI: 0000000000010030 func3 at plt:
-# NOBTI-NEXT: 10030: adrp x16, #131072
-# NOBTI-NEXT: 10034: ldr x17, [x16, #24]
-# NOBTI-NEXT: 10038: add x16, x16, #24
-# NOBTI-NEXT: 1003c: br x17
+# NOBTI: 00000000000102d0 .plt:
+# NOBTI-NEXT: 102d0: stp x16, x30, [sp, #-16]!
+# NOBTI-NEXT: 102d4: adrp x16, #131072
+# NOBTI-NEXT: 102d8: ldr x17, [x16, #960]
+# NOBTI-NEXT: 102dc: add x16, x16, #960
+# NOBTI-NEXT: 102e0: br x17
+# NOBTI-NEXT: 102e4: nop
+# NOBTI-NEXT: 102e8: nop
+# NOBTI-NEXT: 102ec: nop
+# NOBTI: 00000000000102f0 func3 at plt:
+# NOBTI-NEXT: 102f0: adrp x16, #131072
+# NOBTI-NEXT: 102f4: ldr x17, [x16, #968]
+# NOBTI-NEXT: 102f8: add x16, x16, #968
+# NOBTI-NEXT: 102fc: br x17
+
+## The .got.plt should be identical between the BTI and no BTI DSO PLT.
+# SOGOTPLT: Hex dump of section '.got.plt'
+# SOGOTPLT-NEXT: 0x000303b0 00000000 00000000 00000000 00000000
+# SOGOTPLT-NEXT: 0x000303c0 00000000 00000000 d0020100 00000000
## Expect a bti c at the start of plt[0], the plt entries do not need bti c as
## their address doesn't escape the shared object, so they can't be indirectly
## called. Expect no other difference.
-# RUN: ld.lld %t1.o %t3.o --shared -o %t.so
+# RUN: ld.lld %t1.o %t3.o --shared --soname=t.so -o %t.so
# RUN: llvm-readelf -n %t.so | FileCheck --check-prefix BTIPROP %s
# RUN: llvm-objdump -d -mattr=+bti --no-show-raw-insn %t.so | FileCheck --check-prefix BTISO %s
-# RUN: llvm-readelf -x .got.plt %t.so | FileCheck --check-prefix SOGOTPLT %s
+# RUN: llvm-readelf -x .got.plt %t.so | FileCheck --check-prefix SOGOTPLT2 %s
# RUN: llvm-readelf --dynamic-table %t.so | FileCheck --check-prefix BTIDYN %s
# BTIPROP: Properties: aarch64 feature: BTI
@@ -50,61 +55,60 @@
# BTIDYN: 0x0000000070000001 (AARCH64_BTI_PLT)
# BTIDYN-NOT: 0x0000000070000003 (AARCH64_PAC_PLT)
-# BTISO: 0000000000010000 func2:
-# BTISO-NEXT: 10000: bl #48 <func3 at plt>
-# BTISO-NEXT: 10004: ret
+# BTISO: 0000000000010310 func2:
+# BTISO-NEXT: 10310: bl #48 <func3 at plt>
+# BTISO-NEXT: 10314: ret
# BTISO: Disassembly of section .plt:
-# BTISO: 0000000000010010 .plt:
-# BTISO-NEXT: 10010: bti c
-# BTISO-NEXT: 10014: stp x16, x30, [sp, #-16]!
-# BTISO-NEXT: 10018: adrp x16, #131072
-# BTISO-NEXT: 1001c: ldr x17, [x16, #16]
-# BTISO-NEXT: 10020: add x16, x16, #16
-# BTISO-NEXT: 10024: br x17
-# BTISO-NEXT: 10028: nop
-# BTISO-NEXT: 1002c: nop
-# BTISO: 0000000000010030 func3 at plt:
-# BTISO-NEXT: 10030: adrp x16, #131072
-# BTISO-NEXT: 10034: ldr x17, [x16, #24]
-# BTISO-NEXT: 10038: add x16, x16, #24
-# BTISO-NEXT: 1003c: br x17
-
-## The .got.plt should be identical between the BTI and no BTI DSO PLT.
-# SOGOTPLT: Hex dump of section '.got.plt'
-# SOGOTPLT-NEXT: 0x00030000 00000000 00000000 00000000 00000000
-# SOGOTPLT-NEXT: 0x00030010 00000000 00000000 10000100 00000000
+# BTISO: 0000000000010320 .plt:
+# BTISO-NEXT: 10320: bti c
+# BTISO-NEXT: 10324: stp x16, x30, [sp, #-16]!
+# BTISO-NEXT: 10328: adrp x16, #131072
+# BTISO-NEXT: 1032c: ldr x17, [x16, #1072]
+# BTISO-NEXT: 10330: add x16, x16, #1072
+# BTISO-NEXT: 10334: br x17
+# BTISO-NEXT: 10338: nop
+# BTISO-NEXT: 1033c: nop
+# BTISO: 0000000000010340 func3 at plt:
+# BTISO-NEXT: 10340: adrp x16, #131072
+# BTISO-NEXT: 10344: ldr x17, [x16, #1080]
+# BTISO-NEXT: 10348: add x16, x16, #1080
+# BTISO-NEXT: 1034c: br x17
+
+# SOGOTPLT2: Hex dump of section '.got.plt'
+# SOGOTPLT2-NEXT: 0x00030420 00000000 00000000 00000000 00000000
+# SOGOTPLT2-NEXT: 0x00030430 00000000 00000000 20030100 00000000
## Build an executable with all relocatable inputs having the BTI
## .note.gnu.property. We expect a bti c in front of all PLT entries as the
## address of a PLT entry can escape an executable.
-# RUN: ld.lld %t2.o --shared -o %t2.so
+# RUN: ld.lld %t2.o --shared --soname=t2.so -o %t2.so
# RUN: ld.lld %t.o %t.so %t2.so -o %t.exe
# RUN: llvm-readelf --dynamic-table -n %t.exe | FileCheck --check-prefix=BTIPROP %s
# RUN: llvm-objdump -d -mattr=+bti --no-show-raw-insn %t.exe | FileCheck --check-prefix=EXECBTI %s
# EXECBTI: Disassembly of section .text:
-# EXECBTI: 0000000000210000 func1:
-# EXECBTI-NEXT: 210000: bl #48 <func2 at plt>
-# EXECBTI-NEXT: 210004: ret
+# EXECBTI: 0000000000210310 func1:
+# EXECBTI-NEXT: 210310: bl #48 <func2 at plt>
+# EXECBTI-NEXT: 210314: ret
# EXECBTI: Disassembly of section .plt:
-# EXECBTI: 0000000000210010 .plt:
-# EXECBTI-NEXT: 210010: bti c
-# EXECBTI-NEXT: 210014: stp x16, x30, [sp, #-16]!
-# EXECBTI-NEXT: 210018: adrp x16, #131072
-# EXECBTI-NEXT: 21001c: ldr x17, [x16, #16]
-# EXECBTI-NEXT: 210020: add x16, x16, #16
-# EXECBTI-NEXT: 210024: br x17
-# EXECBTI-NEXT: 210028: nop
-# EXECBTI-NEXT: 21002c: nop
-# EXECBTI: 0000000000210030 func2 at plt:
-# EXECBTI-NEXT: 210030: bti c
-# EXECBTI-NEXT: 210034: adrp x16, #131072
-# EXECBTI-NEXT: 210038: ldr x17, [x16, #24]
-# EXECBTI-NEXT: 21003c: add x16, x16, #24
-# EXECBTI-NEXT: 210040: br x17
-# EXECBTI-NEXT: 210044: nop
+# EXECBTI: 0000000000210320 .plt:
+# EXECBTI-NEXT: 210320: bti c
+# EXECBTI-NEXT: 210324: stp x16, x30, [sp, #-16]!
+# EXECBTI-NEXT: 210328: adrp x16, #131072
+# EXECBTI-NEXT: 21032c: ldr x17, [x16, #1112]
+# EXECBTI-NEXT: 210330: add x16, x16, #1112
+# EXECBTI-NEXT: 210334: br x17
+# EXECBTI-NEXT: 210338: nop
+# EXECBTI-NEXT: 21033c: nop
+# EXECBTI: 0000000000210340 func2 at plt:
+# EXECBTI-NEXT: 210340: bti c
+# EXECBTI-NEXT: 210344: adrp x16, #131072
+# EXECBTI-NEXT: 210348: ldr x17, [x16, #1120]
+# EXECBTI-NEXT: 21034c: add x16, x16, #1120
+# EXECBTI-NEXT: 210350: br x17
+# EXECBTI-NEXT: 210354: nop
## We expect the same for PIE, as the address of an ifunc can escape
# RUN: ld.lld --pie %t.o %t.so %t2.so -o %tpie.exe
@@ -113,26 +117,26 @@
# RUN: llvm-objdump -d -mattr=+bti --no-show-raw-insn %tpie.exe | FileCheck --check-prefix=PIE %s
# PIE: Disassembly of section .text:
-# PIE: 0000000000010000 func1:
-# PIE-NEXT: 10000: bl #48 <func2 at plt>
-# PIE-NEXT: 10004: ret
+# PIE: 0000000000010310 func1:
+# PIE-NEXT: 10310: bl #48 <func2 at plt>
+# PIE-NEXT: 10314: ret
# PIE: Disassembly of section .plt:
-# PIE: 0000000000010010 .plt:
-# PIE-NEXT: 10010: bti c
-# PIE-NEXT: 10014: stp x16, x30, [sp, #-16]!
-# PIE-NEXT: 10018: adrp x16, #131072
-# PIE-NEXT: 1001c: ldr x17, [x16, #16]
-# PIE-NEXT: 10020: add x16, x16, #16
-# PIE-NEXT: 10024: br x17
-# PIE-NEXT: 10028: nop
-# PIE-NEXT: 1002c: nop
-# PIE: 0000000000010030 func2 at plt:
-# PIE-NEXT: 10030: bti c
-# PIE-NEXT: 10034: adrp x16, #131072
-# PIE-NEXT: 10038: ldr x17, [x16, #24]
-# PIE-NEXT: 1003c: add x16, x16, #24
-# PIE-NEXT: 10040: br x17
-# PIE-NEXT: 10044: nop
+# PIE: 0000000000010320 .plt:
+# PIE-NEXT: 10320: bti c
+# PIE-NEXT: 10324: stp x16, x30, [sp, #-16]!
+# PIE-NEXT: 10328: adrp x16, #131072
+# PIE-NEXT: 1032c: ldr x17, [x16, #1112]
+# PIE-NEXT: 10330: add x16, x16, #1112
+# PIE-NEXT: 10334: br x17
+# PIE-NEXT: 10338: nop
+# PIE-NEXT: 1033c: nop
+# PIE: 0000000000010340 func2 at plt:
+# PIE-NEXT: 10340: bti c
+# PIE-NEXT: 10344: adrp x16, #131072
+# PIE-NEXT: 10348: ldr x17, [x16, #1120]
+# PIE-NEXT: 1034c: add x16, x16, #1120
+# PIE-NEXT: 10350: br x17
+# PIE-NEXT: 10354: nop
## Build and executable with not all relocatable inputs having the BTI
## .note.property, expect no bti c and no .note.gnu.property entry
@@ -142,26 +146,26 @@
# RUN: llvm-objdump -d -mattr=+bti --no-show-raw-insn %tnobti.exe | FileCheck --check-prefix=NOEX %s
# NOEX: Disassembly of section .text:
-# NOEX: 0000000000210000 func1:
-# NOEX-NEXT: 210000: bl #48 <func2 at plt>
-# NOEX-NEXT: 210004: ret
-# NOEX: 0000000000210008 func3:
-# NOEX-NEXT: 210008: ret
+# NOEX: 00000000002102e0 func1:
+# NOEX-NEXT: 2102e0: bl #48 <func2 at plt>
+# NOEX-NEXT: 2102e4: ret
+# NOEX: 00000000002102e8 func3:
+# NOEX-NEXT: 2102e8: ret
# NOEX: Disassembly of section .plt:
-# NOEX: 0000000000210010 .plt:
-# NOEX-NEXT: 210010: stp x16, x30, [sp, #-16]!
-# NOEX-NEXT: 210014: adrp x16, #131072
-# NOEX-NEXT: 210018: ldr x17, [x16, #16]
-# NOEX-NEXT: 21001c: add x16, x16, #16
-# NOEX-NEXT: 210020: br x17
-# NOEX-NEXT: 210024: nop
-# NOEX-NEXT: 210028: nop
-# NOEX-NEXT: 21002c: nop
-# NOEX: 0000000000210030 func2 at plt:
-# NOEX-NEXT: 210030: adrp x16, #131072
-# NOEX-NEXT: 210034: ldr x17, [x16, #24]
-# NOEX-NEXT: 210038: add x16, x16, #24
-# NOEX-NEXT: 21003c: br x17
+# NOEX: 00000000002102f0 .plt:
+# NOEX-NEXT: 2102f0: stp x16, x30, [sp, #-16]!
+# NOEX-NEXT: 2102f4: adrp x16, #131072
+# NOEX-NEXT: 2102f8: ldr x17, [x16, #1024]
+# NOEX-NEXT: 2102fc: add x16, x16, #1024
+# NOEX-NEXT: 210300: br x17
+# NOEX-NEXT: 210304: nop
+# NOEX-NEXT: 210308: nop
+# NOEX-NEXT: 21030c: nop
+# NOEX: 0000000000210310 func2 at plt:
+# NOEX-NEXT: 210310: adrp x16, #131072
+# NOEX-NEXT: 210314: ldr x17, [x16, #1032]
+# NOEX-NEXT: 210318: add x16, x16, #1032
+# NOEX-NEXT: 21031c: br x17
## Force BTI entries with the --force-bti command line option. Expect a warning
## from the file without the .note.gnu.property.
@@ -176,28 +180,28 @@
# RUN: llvm-objdump -d -mattr=+bti --no-show-raw-insn %tforcebti.exe | FileCheck --check-prefix=FORCE %s
# FORCE: Disassembly of section .text:
-# FORCE: 0000000000210000 func1:
-# FORCE-NEXT: 210000: bl #48 <func2 at plt>
-# FORCE-NEXT: 210004: ret
-# FORCE: 0000000000210008 func3:
-# FORCE-NEXT: 210008: ret
+# FORCE: 0000000000210338 func1:
+# FORCE-NEXT: 210338: bl #56 <func2 at plt>
+# FORCE-NEXT: 21033c: ret
+# FORCE: 0000000000210340 func3:
+# FORCE-NEXT: 210340: ret
# FORCE: Disassembly of section .plt:
-# FORCE: 0000000000210010 .plt:
-# FORCE-NEXT: 210010: bti c
-# FORCE-NEXT: 210014: stp x16, x30, [sp, #-16]!
-# FORCE-NEXT: 210018: adrp x16, #131072
-# FORCE-NEXT: 21001c: ldr x17, [x16, #16]
-# FORCE-NEXT: 210020: add x16, x16, #16
-# FORCE-NEXT: 210024: br x17
-# FORCE-NEXT: 210028: nop
-# FORCE-NEXT: 21002c: nop
-# FORCE: 0000000000210030 func2 at plt:
-# FORCE-NEXT: 210030: bti c
-# FORCE-NEXT: 210034: adrp x16, #131072
-# FORCE-NEXT: 210038: ldr x17, [x16, #24]
-# FORCE-NEXT: 21003c: add x16, x16, #24
-# FORCE-NEXT: 210040: br x17
-# FORCE-NEXT: 210044: nop
+# FORCE: 0000000000210350 .plt:
+# FORCE-NEXT: 210350: bti c
+# FORCE-NEXT: 210354: stp x16, x30, [sp, #-16]!
+# FORCE-NEXT: 210358: adrp x16, #131072
+# FORCE-NEXT: 21035c: ldr x17, [x16, #1144]
+# FORCE-NEXT: 210360: add x16, x16, #1144
+# FORCE-NEXT: 210364: br x17
+# FORCE-NEXT: 210368: nop
+# FORCE-NEXT: 21036c: nop
+# FORCE: 0000000000210370 func2 at plt:
+# FORCE-NEXT: 210370: bti c
+# FORCE-NEXT: 210374: adrp x16, #131072
+# FORCE-NEXT: 210378: ldr x17, [x16, #1152]
+# FORCE-NEXT: 21037c: add x16, x16, #1152
+# FORCE-NEXT: 210380: br x17
+# FORCE-NEXT: 210384: nop
.section ".note.gnu.property", "a"
.long 4
Modified: lld/trunk/test/ELF/aarch64-feature-btipac.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-feature-btipac.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-feature-btipac.s (original)
+++ lld/trunk/test/ELF/aarch64-feature-btipac.s Tue Aug 20 01:34:56 2019
@@ -9,34 +9,34 @@
## PLT[0] has bti c at start
## PLT[n] has autia1716 before br x17
-# RUN: ld.lld %t1.o %t3btipac.o --shared -o %t.so
+# RUN: ld.lld %t1.o %t3btipac.o --shared --soname=t.so -o %t.so
# RUN: llvm-readelf -n %t.so | FileCheck --check-prefix BTIPACPROP %s
# RUN: llvm-objdump -d -mattr=+v8.5a --no-show-raw-insn %t.so | FileCheck --check-prefix BTIPACSO %s
# RUN: llvm-readelf --dynamic-table %t.so | FileCheck --check-prefix BTIPACDYN %s
# BTIPACSO: Disassembly of section .text:
-# BTIPACSO: 0000000000010000 func2:
-# BTIPACSO-NEXT: 10000: bl #48 <func3 at plt>
-# BTIPACSO-NEXT: 10004: ret
-# BTIPACSO: 0000000000010008 func3:
-# BTIPACSO-NEXT: 10008: ret
+# BTIPACSO: 0000000000010310 func2:
+# BTIPACSO-NEXT: 10310: bl #48 <func3 at plt>
+# BTIPACSO-NEXT: 10314: ret
+# BTIPACSO: 0000000000010318 func3:
+# BTIPACSO-NEXT: 10318: ret
# BTIPACSO: Disassembly of section .plt:
-# BTIPACSO: 0000000000010010 .plt:
-# BTIPACSO-NEXT: 10010: bti c
-# BTIPACSO-NEXT: 10014: stp x16, x30, [sp, #-16]!
-# BTIPACSO-NEXT: 10018: adrp x16, #131072
-# BTIPACSO-NEXT: 1001c: ldr x17, [x16, #16]
-# BTIPACSO-NEXT: 10020: add x16, x16, #16
-# BTIPACSO-NEXT: 10024: br x17
-# BTIPACSO-NEXT: 10028: nop
-# BTIPACSO-NEXT: 1002c: nop
-# BTIPACSO: 0000000000010030 func3 at plt:
-# BTIPACSO-NEXT: 10030: adrp x16, #131072
-# BTIPACSO-NEXT: 10034: ldr x17, [x16, #24]
-# BTIPACSO-NEXT: 10038: add x16, x16, #24
-# BTIPACSO-NEXT: 1003c: autia1716
-# BTIPACSO-NEXT: 10040: br x17
-# BTIPACSO-NEXT: 10044: nop
+# BTIPACSO: 0000000000010320 .plt:
+# BTIPACSO-NEXT: 10320: bti c
+# BTIPACSO-NEXT: 10324: stp x16, x30, [sp, #-16]!
+# BTIPACSO-NEXT: 10328: adrp x16, #131072
+# BTIPACSO-NEXT: 1032c: ldr x17, [x16, #1096]
+# BTIPACSO-NEXT: 10330: add x16, x16, #1096
+# BTIPACSO-NEXT: 10334: br x17
+# BTIPACSO-NEXT: 10338: nop
+# BTIPACSO-NEXT: 1033c: nop
+# BTIPACSO: 0000000000010340 func3 at plt:
+# BTIPACSO-NEXT: 10340: adrp x16, #131072
+# BTIPACSO-NEXT: 10344: ldr x17, [x16, #1104]
+# BTIPACSO-NEXT: 10348: add x16, x16, #1104
+# BTIPACSO-NEXT: 1034c: autia1716
+# BTIPACSO-NEXT: 10350: br x17
+# BTIPACSO-NEXT: 10354: nop
# BTIPACPROP: Properties: aarch64 feature: BTI, PAC
@@ -53,29 +53,29 @@
# RUN: llvm-readelf --dynamic-table %t.exe | FileCheck --check-prefix BTIPACDYN %s
# BTIPACEX: Disassembly of section .text:
-# BTIPACEX: 0000000000210000 func1:
-# BTIPACEX-NEXT: 210000: bl #48 <func2 at plt>
-# BTIPACEX-NEXT: 210004: ret
-# BTIPACEX-NEXT: 210008: ret
-# BTIPACEX: 000000000021000c func3:
-# BTIPACEX-NEXT: 21000c: ret
+# BTIPACEX: 0000000000210338 func1:
+# BTIPACEX-NEXT: 210338: bl #56 <func2 at plt>
+# BTIPACEX-NEXT: 21033c: ret
+# BTIPACEX-NEXT: 210340: ret
+# BTIPACEX: 0000000000210344 func3:
+# BTIPACEX-NEXT: 210344: ret
# BTIPACEX: Disassembly of section .plt:
-# BTIPACEX: 0000000000210010 .plt:
-# BTIPACEX-NEXT: 210010: bti c
-# BTIPACEX-NEXT: 210014: stp x16, x30, [sp, #-16]!
-# BTIPACEX-NEXT: 210018: adrp x16, #131072
-# BTIPACEX-NEXT: 21001c: ldr x17, [x16, #16]
-# BTIPACEX-NEXT: 210020: add x16, x16, #16
-# BTIPACEX-NEXT: 210024: br x17
-# BTIPACEX-NEXT: 210028: nop
-# BTIPACEX-NEXT: 21002c: nop
-# BTIPACEX: 0000000000210030 func2 at plt:
-# BTIPACEX-NEXT: 210030: bti c
-# BTIPACEX-NEXT: 210034: adrp x16, #131072
-# BTIPACEX-NEXT: 210038: ldr x17, [x16, #24]
-# BTIPACEX-NEXT: 21003c: add x16, x16, #24
-# BTIPACEX-NEXT: 210040: autia1716
-# BTIPACEX-NEXT: 210044: br x17
+# BTIPACEX: 0000000000210350 .plt:
+# BTIPACEX-NEXT: 210350: bti c
+# BTIPACEX-NEXT: 210354: stp x16, x30, [sp, #-16]!
+# BTIPACEX-NEXT: 210358: adrp x16, #131072
+# BTIPACEX-NEXT: 21035c: ldr x17, [x16, #1160]
+# BTIPACEX-NEXT: 210360: add x16, x16, #1160
+# BTIPACEX-NEXT: 210364: br x17
+# BTIPACEX-NEXT: 210368: nop
+# BTIPACEX-NEXT: 21036c: nop
+# BTIPACEX: 0000000000210370 func2 at plt:
+# BTIPACEX-NEXT: 210370: bti c
+# BTIPACEX-NEXT: 210374: adrp x16, #131072
+# BTIPACEX-NEXT: 210378: ldr x17, [x16, #1168]
+# BTIPACEX-NEXT: 21037c: add x16, x16, #1168
+# BTIPACEX-NEXT: 210380: autia1716
+# BTIPACEX-NEXT: 210384: br x17
## Check that combinations of BTI+PAC with 0 properties results in standard PLT
@@ -84,27 +84,27 @@
# RUN: llvm-readelf --dynamic-table %t.exe | FileCheck --check-prefix=NODYN %s
# EX: Disassembly of section .text:
-# EX: 0000000000210000 func1:
-# EX-NEXT: 210000: bl #48 <func2 at plt>
-# EX-NEXT: 210004: ret
-# EX-NEXT: 210008: ret
-# EX: 000000000021000c func3:
-# EX-NEXT: 21000c: ret
+# EX: 00000000002102e0 func1:
+# EX-NEXT: 2102e0: bl #48 <func2 at plt>
+# EX-NEXT: 2102e4: ret
+# EX-NEXT: 2102e8: ret
+# EX: 00000000002102ec func3:
+# EX-NEXT: 2102ec: ret
# EX: Disassembly of section .plt:
-# EX: 0000000000210010 .plt:
-# EX-NEXT: 210010: stp x16, x30, [sp, #-16]!
-# EX-NEXT: 210014: adrp x16, #131072
-# EX-NEXT: 210018: ldr x17, [x16, #16]
-# EX-NEXT: 21001c: add x16, x16, #16
-# EX-NEXT: 210020: br x17
-# EX-NEXT: 210024: nop
-# EX-NEXT: 210028: nop
-# EX-NEXT: 21002c: nop
-# EX: 0000000000210030 func2 at plt:
-# EX: 210030: adrp x16, #131072
-# EX-NEXT: 210034: ldr x17, [x16, #24]
-# EX-NEXT: 210038: add x16, x16, #24
-# EX-NEXT: 21003c: br x17
+# EX: 00000000002102f0 .plt:
+# EX-NEXT: 2102f0: stp x16, x30, [sp, #-16]!
+# EX-NEXT: 2102f4: adrp x16, #131072
+# EX-NEXT: 2102f8: ldr x17, [x16, #1024]
+# EX-NEXT: 2102fc: add x16, x16, #1024
+# EX-NEXT: 210300: br x17
+# EX-NEXT: 210304: nop
+# EX-NEXT: 210308: nop
+# EX-NEXT: 21030c: nop
+# EX: 0000000000210310 func2 at plt:
+# EX: 210310: adrp x16, #131072
+# EX-NEXT: 210314: ldr x17, [x16, #1032]
+# EX-NEXT: 210318: add x16, x16, #1032
+# EX-NEXT: 21031c: br x17
# NODYN-NOT: 0x0000000070000001 (AARCH64_BTI_PLT)
# NODYN-NOT: 0x0000000070000003 (AARCH64_PAC_PLT)
Modified: lld/trunk/test/ELF/aarch64-feature-pac.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-feature-pac.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-feature-pac.s (original)
+++ lld/trunk/test/ELF/aarch64-feature-pac.s Tue Aug 20 01:34:56 2019
@@ -13,62 +13,65 @@
# RUN: llvm-readelf -x .got.plt %tno.so | FileCheck --check-prefix SOGOTPLT %s
# RUN: llvm-readelf --dynamic-table %tno.so | FileCheck --check-prefix NOPACDYN %s
-# NOPAC: 0000000000010000 func2:
-# NOPAC-NEXT: 10000: bl #48 <func3 at plt>
-# NOPAC-NEXT: 10004: ret
+# NOPAC: 00000000000102b8 func2:
+# NOPAC-NEXT: 102b8: bl #56 <func3 at plt>
+# NOPAC-NEXT: 102bc: ret
# NOPAC: Disassembly of section .plt:
-# NOPAC: 0000000000010010 .plt:
-# NOPAC-NEXT: 10010: stp x16, x30, [sp, #-16]!
-# NOPAC-NEXT: 10014: adrp x16, #131072
-# NOPAC-NEXT: 10018: ldr x17, [x16, #16]
-# NOPAC-NEXT: 1001c: add x16, x16, #16
-# NOPAC-NEXT: 10020: br x17
-# NOPAC-NEXT: 10024: nop
-# NOPAC-NEXT: 10028: nop
-# NOPAC-NEXT: 1002c: nop
-# NOPAC: 0000000000010030 func3 at plt:
-# NOPAC-NEXT: 10030: adrp x16, #131072
-# NOPAC-NEXT: 10034: ldr x17, [x16, #24]
-# NOPAC-NEXT: 10038: add x16, x16, #24
-# NOPAC-NEXT: 1003c: br x17
+# NOPAC: 00000000000102d0 .plt:
+# NOPAC-NEXT: 102d0: stp x16, x30, [sp, #-16]!
+# NOPAC-NEXT: 102d4: adrp x16, #131072
+# NOPAC-NEXT: 102d8: ldr x17, [x16, #960]
+# NOPAC-NEXT: 102dc: add x16, x16, #960
+# NOPAC-NEXT: 102e0: br x17
+# NOPAC-NEXT: 102e4: nop
+# NOPAC-NEXT: 102e8: nop
+# NOPAC-NEXT: 102ec: nop
+# NOPAC: 00000000000102f0 func3 at plt:
+# NOPAC-NEXT: 102f0: adrp x16, #131072
+# NOPAC-NEXT: 102f4: ldr x17, [x16, #968]
+# NOPAC-NEXT: 102f8: add x16, x16, #968
+# NOPAC-NEXT: 102fc: br x17
# NOPACDYN-NOT: 0x0000000070000001 (AARCH64_BTI_PLT)
# NOPACDYN-NOT: 0x0000000070000003 (AARCH64_PAC_PLT)
-# RUN: ld.lld %t1.o %t3.o --shared -o %t.so
+# RUN: ld.lld %t1.o %t3.o --shared --soname=t.so -o %t.so
# RUN: llvm-readelf -n %t.so | FileCheck --check-prefix PACPROP %s
# RUN: llvm-objdump -d -mattr=+v8.3a --no-show-raw-insn %t.so | FileCheck --check-prefix PACSO %s
-# RUN: llvm-readelf -x .got.plt %t.so | FileCheck --check-prefix SOGOTPLT %s
+# RUN: llvm-readelf -x .got.plt %t.so | FileCheck --check-prefix SOGOTPLT2 %s
# RUN: llvm-readelf --dynamic-table %t.so | FileCheck --check-prefix PACDYN %s
## PAC has no effect on PLT[0], for PLT[N] autia1716 is used to authenticate
## the address in x17 (context in x16) before branching to it. The dynamic
## loader is responsible for calling pacia1716 on the entry.
-# PACSO: 0000000000010000 func2:
-# PACSO-NEXT: 10000: bl #48 <func3 at plt>
-# PACSO-NEXT: 10004: ret
+# PACSO: 0000000000010310 func2:
+# PACSO-NEXT: 10310: bl #48 <func3 at plt>
+# PACSO-NEXT: 10314: ret
# PACSO: Disassembly of section .plt:
-# PACSO: 0000000000010010 .plt:
-# PACSO-NEXT: 10010: stp x16, x30, [sp, #-16]!
-# PACSO-NEXT: 10014: adrp x16, #131072
-# PACSO-NEXT: 10018: ldr x17, [x16, #16]
-# PACSO-NEXT: 1001c: add x16, x16, #16
-# PACSO-NEXT: 10020: br x17
-# PACSO-NEXT: 10024: nop
-# PACSO-NEXT: 10028: nop
-# PACSO-NEXT: 1002c: nop
-# PACSO: 0000000000010030 func3 at plt:
-# PACSO-NEXT: 10030: adrp x16, #131072
-# PACSO-NEXT: 10034: ldr x17, [x16, #24]
-# PACSO-NEXT: 10038: add x16, x16, #24
-# PACSO-NEXT: 1003c: autia1716
-# PACSO-NEXT: 10040: br x17
-# PACSO-NEXT: 10044: nop
+# PACSO: 0000000000010320 .plt:
+# PACSO-NEXT: 10320: stp x16, x30, [sp, #-16]!
+# PACSO-NEXT: 10324: adrp x16, #131072
+# PACSO-NEXT: 10328: ldr x17, [x16, #1080]
+# PACSO-NEXT: 1032c: add x16, x16, #1080
+# PACSO-NEXT: 10330: br x17
+# PACSO-NEXT: 10334: nop
+# PACSO-NEXT: 10338: nop
+# PACSO-NEXT: 1033c: nop
+# PACSO: 0000000000010340 func3 at plt:
+# PACSO-NEXT: 10340: adrp x16, #131072
+# PACSO-NEXT: 10344: ldr x17, [x16, #1088]
+# PACSO-NEXT: 10348: add x16, x16, #1088
+# PACSO-NEXT: 1034c: autia1716
+# PACSO-NEXT: 10350: br x17
+# PACSO-NEXT: 10354: nop
-# The .got.plt should be identical between the PAC and no PAC DSO PLT.
# SOGOTPLT: Hex dump of section '.got.plt':
-# SOGOTPLT-NEXT: 0x00030000 00000000 00000000 00000000 00000000
-# SOGOTPLT-NEXT: 0x00030010 00000000 00000000 10000100 00000000
+# SOGOTPLT-NEXT: 0x000303b0 00000000 00000000 00000000 00000000
+# SOGOTPLT-NEXT: 0x000303c0 00000000 00000000 d0020100 00000000
+
+# SOGOTPLT2: Hex dump of section '.got.plt':
+# SOGOTPLT2-NEXT: 0x00030428 00000000 00000000 00000000 00000000
+# SOGOTPLT2-NEXT: 0x00030438 00000000 00000000 20030100 00000000
# PACPROP: Properties: aarch64 feature: PAC
@@ -86,28 +89,28 @@
# RUN: llvm-objdump -d -mattr=+v8.3a --no-show-raw-insn %tpacplt.exe | FileCheck --check-prefix PACPLT %s
# PACPLT: Disassembly of section .text:
-# PACPLT: 0000000000210000 func1:
-# PACPLT-NEXT: 210000: bl #48 <func2 at plt>
-# PACPLT-NEXT: 210004: ret
-# PACPLT: 0000000000210008 func3:
-# PACPLT-NEXT: 210008: ret
+# PACPLT: 0000000000210338 func1:
+# PACPLT-NEXT: 210338: bl #56 <func2 at plt>
+# PACPLT-NEXT: 21033c: ret
+# PACPLT: 0000000000210340 func3:
+# PACPLT-NEXT: 210340: ret
# PACPLT: Disassembly of section .plt:
-# PACPLT: 0000000000210010 .plt:
-# PACPLT-NEXT: 210010: stp x16, x30, [sp, #-16]!
-# PACPLT-NEXT: 210014: adrp x16, #131072
-# PACPLT-NEXT: 210018: ldr x17, [x16, #16]
-# PACPLT-NEXT: 21001c: add x16, x16, #16
-# PACPLT-NEXT: 210020: br x17
-# PACPLT-NEXT: 210024: nop
-# PACPLT-NEXT: 210028: nop
-# PACPLT-NEXT: 21002c: nop
-# PACPLT: 0000000000210030 func2 at plt:
-# PACPLT-NEXT: 210030: adrp x16, #131072
-# PACPLT-NEXT: 210034: ldr x17, [x16, #24]
-# PACPLT-NEXT: 210038: add x16, x16, #24
-# PACPLT-NEXT: 21003c: autia1716
-# PACPLT-NEXT: 210040: br x17
-# PACPLT-NEXT: 210044: nop
+# PACPLT: 0000000000210350 .plt:
+# PACPLT-NEXT: 210350: stp x16, x30, [sp, #-16]!
+# PACPLT-NEXT: 210354: adrp x16, #131072
+# PACPLT-NEXT: 210358: ldr x17, [x16, #1144]
+# PACPLT-NEXT: 21035c: add x16, x16, #1144
+# PACPLT-NEXT: 210360: br x17
+# PACPLT-NEXT: 210364: nop
+# PACPLT-NEXT: 210368: nop
+# PACPLT-NEXT: 21036c: nop
+# PACPLT: 0000000000210370 func2 at plt:
+# PACPLT-NEXT: 210370: adrp x16, #131072
+# PACPLT-NEXT: 210374: ldr x17, [x16, #1152]
+# PACPLT-NEXT: 210378: add x16, x16, #1152
+# PACPLT-NEXT: 21037c: autia1716
+# PACPLT-NEXT: 210380: br x17
+# PACPLT-NEXT: 210384: nop
.section ".note.gnu.property", "a"
Modified: lld/trunk/test/ELF/aarch64-fpic-got.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-fpic-got.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-fpic-got.s (original)
+++ lld/trunk/test/ELF/aarch64-fpic-got.s Tue Aug 20 01:34:56 2019
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %p/Inputs/shared.s -o %t-lib.o
-# RUN: ld.lld -shared %t-lib.o -o %t-lib.so
+# RUN: ld.lld -shared %t-lib.o -soname t-lib.so -o %t-lib.so
# RUN: ld.lld %t-lib.so %t.o -o %t.exe
# RUN: llvm-readobj -r %t.exe | FileCheck --check-prefix=RELOC %s
@@ -11,14 +11,14 @@
## Checks if got access to dynamic objects is done through a got relative
## dynamic relocation and not using plt relative (R_AARCH64_JUMP_SLOT).
# RELOC: .rela.dyn {
-# RELOC-NEXT: 0x2200C0 R_AARCH64_GLOB_DAT bar 0x0
+# RELOC-NEXT: 0x220320 R_AARCH64_GLOB_DAT bar 0x0
# RELOC-NEXT: }
-## page(0x2200C0) - page(0x210000) = 65536
-## page(0x2200C0) & 0xff8 = 192
+## page(0x220320) - page(0x210000) = 65536
+## page(0x220320) & 0xff8 = 800
# DIS: _start:
-# DIS-NEXT: 210000: adrp x0, #65536
-# DIS-NEXT: 210004: ldr x0, [x0, #192]
+# DIS-NEXT: 210258: adrp x0, #65536
+# DIS-NEXT: 21025c: ldr x0, [x0, #800]
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-gnu-ifunc-address.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-gnu-ifunc-address.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-gnu-ifunc-address.s (original)
+++ lld/trunk/test/ELF/aarch64-gnu-ifunc-address.s Tue Aug 20 01:34:56 2019
@@ -20,19 +20,18 @@ main:
adrp x8, :got:myfunc
ldr x8, [x8, :got_lo12:myfunc]
ret
-# CHECK: 0000000000010004 main:
-# x8 = 0x20000
-# CHECK-NEXT: 10004: adrp x8, #65536
-# x8 = 0x200a0 = .got entry for myfunc with R_AARCH64_GLOB_DAT
-# CHECK-NEXT: 10008: ldr x8, [x8, #160]
-# CHECK-NEXT: 1000c: ret
+# CHECK: 0000000000010284 main:
+## myfunc's got entry = page(0x20330)-page(0x10284) + 0x330 = 65536 + 816
+# CHECK-NEXT: 10284: adrp x8, #65536
+# CHECK-NEXT: 10288: ldr x8, [x8, #816]
+# CHECK-NEXT: 1028c: ret
# CHECK: Disassembly of section .got:
# CHECK-EMPTY:
-# CHECK-NEXT: 00000000000200a0 .got:
+# CHECK-NEXT: 0000000000020330 .got:
# CHECK-RELOCS: Relocations [
# CHECK-RELOCS-NEXT: Section {{.*}} .rela.dyn {
-# CHECK-RELOCS-NEXT: 0x200A0 R_AARCH64_GLOB_DAT myfunc 0x0
+# CHECK-RELOCS-NEXT: 0x20330 R_AARCH64_GLOB_DAT myfunc 0x0
# CHECK-RELOCS-NEXT: }
# CHECK-RELOCS-NEXT: ]
Modified: lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s (original)
+++ lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s Tue Aug 20 01:34:56 2019
@@ -31,42 +31,42 @@ main:
## The address of myfunc is the address of the PLT entry for myfunc.
# PDE: myfunc_resolver:
-# PDE-NEXT: 210000: ret
+# PDE-NEXT: 210170: ret
# PDE: main:
-# PDE-NEXT: 210004: adrp x8, #0
-# PDE-NEXT: 210008: add x8, x8, #16
-# PDE-NEXT: 21000c: ret
+# PDE-NEXT: 210174: adrp x8, #0
+# PDE-NEXT: 210178: add x8, x8, #384
+# PDE-NEXT: 21017c: ret
# PDE-EMPTY:
# PDE-NEXT: Disassembly of section .plt:
# PDE-EMPTY:
# PDE-NEXT: myfunc:
## page(.got.plt) - page(0x210010) = 65536
-# PDE-NEXT: 210010: adrp x16, #65536
-# PDE-NEXT: 210014: ldr x17, [x16]
-# PDE-NEXT: 210018: add x16, x16, #0
-# PDE-NEXT: 21001c: br x17
+# PDE-NEXT: 210180: adrp x16, #65536
+# PDE-NEXT: 210184: ldr x17, [x16, #400]
+# PDE-NEXT: 210188: add x16, x16, #400
+# PDE-NEXT: 21018c: br x17
## The adrp to myfunc should generate a PLT entry and a GOT entry with an
## irelative relocation.
# PDE-RELOC: .rela.dyn {
-# PDE-RELOC-NEXT: 0x220000 R_AARCH64_IRELATIVE - 0x210000
+# PDE-RELOC-NEXT: 0x220190 R_AARCH64_IRELATIVE - 0x210170
# PDE-RELOC-NEXT: }
# PIE: myfunc_resolver:
-# PIE-NEXT: 10000: ret
+# PIE-NEXT: 10260: ret
# PIE: main:
-# PIE-NEXT: 10004: adrp x8, #0
-# PIE-NEXT: 10008: add x8, x8, #16
-# PIE-NEXT: 1000c: ret
+# PIE-NEXT: 10264: adrp x8, #0
+# PIE-NEXT: 10268: add x8, x8, #624
+# PIE-NEXT: 1026c: ret
# PIE-EMPTY:
# PIE-NEXT: Disassembly of section .plt:
# PIE-EMPTY:
# PIE-NEXT: myfunc:
-# PIE-NEXT: 10010: adrp x16, #131072
-# PIE-NEXT: 10014: ldr x17, [x16]
-# PIE-NEXT: 10018: add x16, x16, #0
-# PIE-NEXT: 1001c: br x17
+# PIE-NEXT: 10270: adrp x16, #131072
+# PIE-NEXT: 10274: ldr x17, [x16, #880]
+# PIE-NEXT: 10278: add x16, x16, #880
+# PIE-NEXT: 1027c: br x17
# PIE-RELOC: .rela.dyn {
-# PIE-RELOC-NEXT: 0x30000 R_AARCH64_IRELATIVE - 0x10000
+# PIE-RELOC-NEXT: 0x30370 R_AARCH64_IRELATIVE - 0x10260
# PIE-RELOC-NEXT: }
Modified: lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable2.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable2.s (original)
+++ lld/trunk/test/ELF/aarch64-gnu-ifunc-nonpreemptable2.s Tue Aug 20 01:34:56 2019
@@ -8,18 +8,18 @@
## ifunc is a non-preemptable STT_GNU_IFUNC. Check we create a canonical PLT
## and redirect .rodata and .data references to it.
-# SEC: .text PROGBITS 0000000000210000
-# SEC: .got.plt PROGBITS 0000000000220008
-# SEC: 0000000000210010 0 FUNC GLOBAL DEFAULT 4 ifunc
+# SEC: .text PROGBITS 0000000000210178
+# SEC: .got.plt PROGBITS 0000000000220198
+# SEC: 0000000000210180 0 FUNC GLOBAL DEFAULT 4 ifunc
## .rodata[0] and .data[0] store the address of the canonical PLT.
# HEX: section '.rodata':
-# HEX-NEXT: 0x00200170 10002100 00000000
+# HEX-NEXT: 0x00200170 80012100 00000000
# HEX: section '.data':
-# HEX-NEXT: 0x00220000 10002100 00000000
+# HEX-NEXT: 0x00220190 80012100 00000000
# RELOC: .rela.dyn {
-# RELOC-NEXT: 0x220008 R_AARCH64_IRELATIVE - 0x210000
+# RELOC-NEXT: 0x220198 R_AARCH64_IRELATIVE - 0x210178
# RELOC-NEXT: }
.globl ifunc
Modified: lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s (original)
+++ lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s Tue Aug 20 01:34:56 2019
@@ -10,21 +10,21 @@
// Check that the IRELATIVE relocations are after the JUMP_SLOT in the plt
// CHECK: Relocations [
// CHECK-NEXT: Section (4) .rela.dyn {
-// CHECK-NEXT: 0x230028 R_AARCH64_IRELATIVE - 0x210000
-// CHECK-NEXT: 0x230030 R_AARCH64_IRELATIVE - 0x210004
+// CHECK-NEXT: 0x230468 R_AARCH64_IRELATIVE - 0x2102D8
+// CHECK-NEXT: 0x230470 R_AARCH64_IRELATIVE - 0x2102DC
// CHECK-NEXT: }
// CHECK-NEXT: Section (5) .rela.plt {
-// CHECK-NEXT: 0x230018 R_AARCH64_JUMP_SLOT bar2 0x0
-// CHECK-NEXT: 0x230020 R_AARCH64_JUMP_SLOT zed2 0x0
+// CHECK-NEXT: 0x230458 R_AARCH64_JUMP_SLOT bar2 0x0
+// CHECK-NEXT: 0x230460 R_AARCH64_JUMP_SLOT zed2 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
// Check that .got.plt entries point back to PLT header
// GOTPLT: Contents of section .got.plt:
-// GOTPLT-NEXT: 230000 00000000 00000000 00000000 00000000
-// GOTPLT-NEXT: 230010 00000000 00000000 20002100 00000000
-// GOTPLT-NEXT: 230020 20002100 00000000 20002100 00000000
-// GOTPLT-NEXT: 230030 20002100 00000000
+// GOTPLT-NEXT: 230440 00000000 00000000 00000000 00000000
+// GOTPLT-NEXT: 230450 00000000 00000000 f0022100 00000000
+// GOTPLT-NEXT: 230460 f0022100 00000000 f0022100 00000000
+// GOTPLT-NEXT: 230470 f0022100 00000000
// Check that the PLTRELSZ tag does not include the IRELATIVE relocations
// CHECK: DynamicSection [
@@ -35,46 +35,46 @@
// DISASM: Disassembly of section .text:
// DISASM-EMPTY:
// DISASM-NEXT: foo:
-// DISASM-NEXT: 210000: ret
+// DISASM-NEXT: 2102d8: ret
// DISASM: bar:
-// DISASM-NEXT: 210004: ret
+// DISASM-NEXT: 2102dc: ret
// DISASM: _start:
-// DISASM-NEXT: 210008: bl #88
-// DISASM-NEXT: 21000c: bl #100
-// DISASM-NEXT: 210010: bl #48
-// DISASM-NEXT: 210014: bl #60
+// DISASM-NEXT: 2102e0: bl #80 <zed2 at plt+0x10>
+// DISASM-NEXT: 2102e4: bl #92 <zed2 at plt+0x20>
+// DISASM-NEXT: 2102e8: bl #40 <bar2 at plt>
+// DISASM-NEXT: 2102ec: bl #52 <zed2 at plt>
// DISASM-EMPTY:
// DISASM-NEXT: Disassembly of section .plt:
// DISASM-EMPTY:
// DISASM-NEXT: .plt:
-// DISASM-NEXT: 210020: stp x16, x30, [sp, #-16]!
-// DISASM-NEXT: 210024: adrp x16, #131072
-// DISASM-NEXT: 210028: ldr x17, [x16, #16]
-// DISASM-NEXT: 21002c: add x16, x16, #16
-// DISASM-NEXT: 210030: br x17
-// DISASM-NEXT: 210034: nop
-// DISASM-NEXT: 210038: nop
-// DISASM-NEXT: 21003c: nop
+// DISASM-NEXT: 2102f0: stp x16, x30, [sp, #-16]!
+// DISASM-NEXT: 2102f4: adrp x16, #131072
+// DISASM-NEXT: 2102f8: ldr x17, [x16, #1104]
+// DISASM-NEXT: 2102fc: add x16, x16, #1104
+// DISASM-NEXT: 210300: br x17
+// DISASM-NEXT: 210304: nop
+// DISASM-NEXT: 210308: nop
+// DISASM-NEXT: 21030c: nop
// DISASM-EMPTY:
// DISASM-NEXT: bar2 at plt:
-// DISASM-NEXT: 210040: adrp x16, #131072
-// DISASM-NEXT: 210044: ldr x17, [x16, #24]
-// DISASM-NEXT: 210048: add x16, x16, #24
-// DISASM-NEXT: 21004c: br x17
+// DISASM-NEXT: 210310: adrp x16, #131072
+// DISASM-NEXT: 210314: ldr x17, [x16, #1112]
+// DISASM-NEXT: 210318: add x16, x16, #1112
+// DISASM-NEXT: 21031c: br x17
// DISASM-EMPTY:
// DISASM-NEXT: zed2 at plt:
-// DISASM-NEXT: 210050: adrp x16, #131072
-// DISASM-NEXT: 210054: ldr x17, [x16, #32]
-// DISASM-NEXT: 210058: add x16, x16, #32
-// DISASM-NEXT: 21005c: br x17
-// DISASM-NEXT: 210060: adrp x16, #131072
-// DISASM-NEXT: 210064: ldr x17, [x16, #40]
-// DISASM-NEXT: 210068: add x16, x16, #40
-// DISASM-NEXT: 21006c: br x17
-// DISASM-NEXT: 210070: adrp x16, #131072
-// DISASM-NEXT: 210074: ldr x17, [x16, #48]
-// DISASM-NEXT: 210078: add x16, x16, #48
-// DISASM-NEXT: 21007c: br x17
+// DISASM-NEXT: 210320: adrp x16, #131072
+// DISASM-NEXT: 210324: ldr x17, [x16, #1120]
+// DISASM-NEXT: 210328: add x16, x16, #1120
+// DISASM-NEXT: 21032c: br x17
+// DISASM-NEXT: 210330: adrp x16, #131072
+// DISASM-NEXT: 210334: ldr x17, [x16, #1128]
+// DISASM-NEXT: 210338: add x16, x16, #1128
+// DISASM-NEXT: 21033c: br x17
+// DISASM-NEXT: 210340: adrp x16, #131072
+// DISASM-NEXT: 210344: ldr x17, [x16, #1136]
+// DISASM-NEXT: 210348: add x16, x16, #1136
+// DISASM-NEXT: 21034c: br x17
.text
.type foo STT_GNU_IFUNC
Modified: lld/trunk/test/ELF/aarch64-gnu-ifunc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-gnu-ifunc.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-gnu-ifunc.s (original)
+++ lld/trunk/test/ELF/aarch64-gnu-ifunc.s Tue Aug 20 01:34:56 2019
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
// RUN: ld.lld -static %t.o -o %tout
-// RUN: llvm-objdump -d %tout | FileCheck %s --check-prefix=DISASM
+// RUN: llvm-objdump -d --no-show-raw-insn %tout | FileCheck %s --check-prefix=DISASM
// RUN: llvm-readobj -r --symbols --sections %tout | FileCheck %s
// CHECK: Sections [
@@ -22,8 +22,8 @@
// CHECK-NEXT: }
// CHECK: Relocations [
// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
-// CHECK-NEXT: 0x220000 R_AARCH64_IRELATIVE
-// CHECK-NEXT: 0x220008 R_AARCH64_IRELATIVE
+// CHECK-NEXT: 0x2201C0 R_AARCH64_IRELATIVE
+// CHECK-NEXT: 0x2201C8 R_AARCH64_IRELATIVE
// CHECK-NEXT: }
// CHECK-NEXT: ]
// CHECK: Symbols [
@@ -38,7 +38,7 @@
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: $x.0
-// CHECK-NEXT: Value: 0x210000
+// CHECK-NEXT: Value: 0x210188
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
@@ -69,7 +69,7 @@
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: _start
-// CHECK-NEXT: Value: 0x210008
+// CHECK-NEXT: Value: 0x210190
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: None
@@ -78,7 +78,7 @@
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: bar
-// CHECK-NEXT: Value: 0x210004
+// CHECK-NEXT: Value: 0x21018C
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: GNU_IFunc
@@ -87,7 +87,7 @@
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: foo
-// CHECK-NEXT: Value: 0x210000
+// CHECK-NEXT: Value: 0x210188
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: GNU_IFunc
@@ -102,26 +102,26 @@
// DISASM: Disassembly of section .text:
// DISASM-EMPTY:
// DISASM-NEXT: foo:
-// DISASM-NEXT: 210000: c0 03 5f d6 ret
+// DISASM-NEXT: 210188: ret
// DISASM: bar:
-// DISASM-NEXT: 210004: c0 03 5f d6 ret
+// DISASM-NEXT: 21018c: ret
// DISASM: _start:
-// DISASM-NEXT: 210008: 06 00 00 94 bl #24
-// DISASM-NEXT: 21000c: 09 00 00 94 bl #36
-// DISASM-NEXT: 210010: 42 60 05 91 add x2, x2, #344
-// DISASM-NEXT: 210014: 42 20 06 91 add x2, x2, #392
+// DISASM-NEXT: 210190: bl #16
+// DISASM-NEXT: 210194: bl #28
+// DISASM-NEXT: 210198: add x2, x2, #344
+// DISASM-NEXT: 21019c: add x2, x2, #392
// DISASM-EMPTY:
// DISASM-NEXT: Disassembly of section .plt:
// DISASM-EMPTY:
// DISASM-NEXT: .plt:
-// DISASM-NEXT: 210020: 90 00 00 90 adrp x16, #65536
-// DISASM-NEXT: 210024: 11 02 40 f9 ldr x17, [x16]
-// DISASM-NEXT: 210028: 10 02 00 91 add x16, x16, #0
-// DISASM-NEXT: 21002c: 20 02 1f d6 br x17
-// DISASM-NEXT: 210030: 90 00 00 90 adrp x16, #65536
-// DISASM-NEXT: 210034: 11 06 40 f9 ldr x17, [x16, #8]
-// DISASM-NEXT: 210038: 10 22 00 91 add x16, x16, #8
-// DISASM-NEXT: 21003c: 20 02 1f d6 br x17
+// DISASM-NEXT: 2101a0: adrp x16, #65536
+// DISASM-NEXT: 2101a4: ldr x17, [x16, #448]
+// DISASM-NEXT: 2101a8: add x16, x16, #448
+// DISASM-NEXT: 2101ac: br x17
+// DISASM-NEXT: 2101b0: adrp x16, #65536
+// DISASM-NEXT: 2101b4: ldr x17, [x16, #456]
+// DISASM-NEXT: 2101b8: add x16, x16, #456
+// DISASM-NEXT: 2101bc: br x17
.text
.type foo STT_GNU_IFUNC
Modified: lld/trunk/test/ELF/aarch64-gnu-ifunc2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-gnu-ifunc2.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-gnu-ifunc2.s (original)
+++ lld/trunk/test/ELF/aarch64-gnu-ifunc2.s Tue Aug 20 01:34:56 2019
@@ -1,35 +1,35 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
# RUN: ld.lld %t.o -o %t
-# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
+# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s
# RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SEC
# RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=RELOC
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# CHECK-NEXT: myfunc:
-# CHECK-NEXT: 210000:
+# CHECK-NEXT: 210170:
# CHECK: main:
-# adrp x8, 0x220000, 0x220000 == address in .got.plt
-# CHECK-NEXT: 210004: adrp x8, #65536
-# CHECK-NEXT: 210008: ldr x8, [x8]
-# CHECK-NEXT: 21000c: ret
+# .got.plt - page(0x210174) = 0x220190 - 0x210000 = 0x10190
+# CHECK-NEXT: 210174: adrp x8, #0x10000
+# CHECK-NEXT: 210178: ldr x8, [x8, #0x190]
+# CHECK-NEXT: 21017c: ret
# CHECK: Disassembly of section .plt:
# CHECK-EMPTY:
# CHECK-NEXT: .plt:
-# adrp x16, 0x220000, 0x220000 == address in .got.plt
-# CHECK-NEXT: 210010: adrp x16, #65536
-# CHECK-NEXT: 210014: ldr x17, [x16]
-# CHECK-NEXT: 210018: add x16, x16, #0
-# CHECK-NEXT: 21001c: br x17
+# .got.plt - page(0x210180) = 0x220190 - 0x210000 = 0x10190
+# CHECK-NEXT: 210180: adrp x16, #0x10000
+# CHECK-NEXT: 210184: ldr x17, [x16, #0x190]
+# CHECK-NEXT: 210188: add x16, x16, #0x190
+# CHECK-NEXT: 21018c: br x17
-# SEC: .got.plt PROGBITS 0000000000220000 020000 000008 00 WA 0 0 8
+# SEC: .got.plt PROGBITS 0000000000220190 000190 000008 00 WA 0 0 8
# RELOC: Relocations [
# RELOC-NEXT: Section {{.*}} .rela.dyn {
-# RELOC-NEXT: 0x220000 R_AARCH64_IRELATIVE - 0x210000
+# RELOC-NEXT: 0x220190 R_AARCH64_IRELATIVE - 0x210170
# RELOC-NEXT: }
# RELOC-NEXT: ]
Modified: lld/trunk/test/ELF/aarch64-got-weak-undef.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-got-weak-undef.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-got-weak-undef.s (original)
+++ lld/trunk/test/ELF/aarch64-got-weak-undef.s Tue Aug 20 01:34:56 2019
@@ -6,7 +6,7 @@
// RELOC: no relocations
-// CHECK: 0x00220000 00000000 00000000
+// CHECK: 0x002201a0 00000000 00000000
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-ifunc-bti.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-ifunc-bti.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-ifunc-bti.s (original)
+++ lld/trunk/test/ELF/aarch64-ifunc-bti.s Tue Aug 20 01:34:56 2019
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %p/Inputs/aarch64-addrifunc.s -o %t1.o
-# RUN: ld.lld --shared %t1.o -o %t1.so
+# RUN: ld.lld --shared --soname=t1.so %t1.o -o %t1.so
# RUN: ld.lld --pie %t1.so %t.o -o %t
# RUN: llvm-objdump -d -mattr=+bti -triple=aarch64-linux-gnu %t | FileCheck %s
@@ -11,30 +11,30 @@
# we must use bti c.
# CHECK: Disassembly of section .plt:
-# CHECK: 0000000000010020 .plt:
-# CHECK-NEXT: 10020: 5f 24 03 d5 bti c
-# CHECK-NEXT: 10024: f0 7b bf a9 stp x16, x30, [sp, #-16]!
-# CHECK-NEXT: 10028: 10 01 00 90 adrp x16, #131072
-# CHECK-NEXT: 1002c: 11 0a 40 f9 ldr x17, [x16, #16]
-# CHECK-NEXT: 10030: 10 42 00 91 add x16, x16, #16
-# CHECK-NEXT: 10034: 20 02 1f d6 br x17
-# CHECK-NEXT: 10038: 1f 20 03 d5 nop
-# CHECK-NEXT: 1003c: 1f 20 03 d5 nop
-# CHECK: 0000000000010040 func1 at plt:
-# CHECK-NEXT: 10040: 5f 24 03 d5 bti c
-# CHECK-NEXT: 10044: 10 01 00 90 adrp x16, #131072
-# CHECK-NEXT: 10048: 11 0e 40 f9 ldr x17, [x16, #24]
-# CHECK-NEXT: 1004c: 10 62 00 91 add x16, x16, #24
-# CHECK-NEXT: 10050: 20 02 1f d6 br x17
-# CHECK-NEXT: 10054: 1f 20 03 d5 nop
+# CHECK: 0000000000010340 .plt:
+# CHECK-NEXT: 10340: 5f 24 03 d5 bti c
+# CHECK-NEXT: 10344: f0 7b bf a9 stp x16, x30, [sp, #-16]!
+# CHECK-NEXT: 10348: 10 01 00 90 adrp x16, #131072
+# CHECK-NEXT: 1034c: 11 5e 42 f9 ldr x17, [x16, #1208]
+# CHECK-NEXT: 10350: 10 e2 12 91 add x16, x16, #1208
+# CHECK-NEXT: 10354: 20 02 1f d6 br x17
+# CHECK-NEXT: 10358: 1f 20 03 d5 nop
+# CHECK-NEXT: 1035c: 1f 20 03 d5 nop
+# CHECK: 0000000000010360 func1 at plt:
+# CHECK-NEXT: 10360: 5f 24 03 d5 bti c
+# CHECK-NEXT: 10364: 10 01 00 90 adrp x16, #131072
+# CHECK-NEXT: 10368: 11 62 42 f9 ldr x17, [x16, #1216]
+# CHECK-NEXT: 1036c: 10 02 13 91 add x16, x16, #1216
+# CHECK-NEXT: 10370: 20 02 1f d6 br x17
+# CHECK-NEXT: 10374: 1f 20 03 d5 nop
# CHECK-NEXT: ...
-# CHECK: 0000000000010060 myfunc:
-# CHECK-NEXT: 10060: 5f 24 03 d5 bti c
-# CHECK-NEXT: 10064: 10 01 00 90 adrp x16, #131072
-# CHECK-NEXT: 10068: 11 12 40 f9 ldr x17, [x16, #32]
-# CHECK-NEXT: 1006c: 10 82 00 91 add x16, x16, #32
-# CHECK-NEXT: 10070: 20 02 1f d6 br x17
-# CHECK-NEXT: 10074: 1f 20 03 d5 nop
+# CHECK: 0000000000010380 myfunc:
+# CHECK-NEXT: 10380: 5f 24 03 d5 bti c
+# CHECK-NEXT: 10384: 10 01 00 90 adrp x16, #131072
+# CHECK-NEXT: 10388: 11 66 42 f9 ldr x17, [x16, #1224]
+# CHECK-NEXT: 1038c: 10 22 13 91 add x16, x16, #1224
+# CHECK-NEXT: 10390: 20 02 1f d6 br x17
+# CHECK-NEXT: 10394: 1f 20 03 d5 nop
.section ".note.gnu.property", "a"
.long 4
Modified: lld/trunk/test/ELF/aarch64-jump26-thunk.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-jump26-thunk.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-jump26-thunk.s (original)
+++ lld/trunk/test/ELF/aarch64-jump26-thunk.s Tue Aug 20 01:34:56 2019
@@ -12,10 +12,10 @@ _start:
// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK-NEXT: _start:
-// CHECK-NEXT: 210000: b #8
+// CHECK-NEXT: 210120: b #8
// CHECK: __AArch64AbsLongThunk_big:
-// CHECK-NEXT: 210008: ldr x16, #8
-// CHECK-NEXT: 21000c: br x16
+// CHECK-NEXT: 210128: ldr x16, #8
+// CHECK-NEXT: 21012c: br x16
// CHECK: $d:
-// CHECK-NEXT: 210010: 00 00 00 00 .word 0x00000000
-// CHECK-NEXT: 210014: 10 00 00 00 .word 0x00000010
+// CHECK-NEXT: 210130: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 210134: 10 00 00 00 .word 0x00000010
Modified: lld/trunk/test/ELF/aarch64-ldprel-lo19-invalid.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-ldprel-lo19-invalid.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-ldprel-lo19-invalid.s (original)
+++ lld/trunk/test/ELF/aarch64-ldprel-lo19-invalid.s Tue Aug 20 01:34:56 2019
@@ -3,7 +3,7 @@
# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-none %s -o %t.o
# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
-# CHECK: relocation R_AARCH64_LD_PREL_LO19 out of range: 2131072 is not in [-1048576, 1048575]
+# CHECK: relocation R_AARCH64_LD_PREL_LO19 out of range: 2131192 is not in [-1048576, 1048575]
ldr x8, patatino
.data
Modified: lld/trunk/test/ELF/aarch64-lo12-alignment.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-lo12-alignment.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-lo12-alignment.s (original)
+++ lld/trunk/test/ELF/aarch64-lo12-alignment.s Tue Aug 20 01:34:56 2019
@@ -39,7 +39,7 @@ foo4:
foo8:
.space 8
-// CHECK: improper alignment for relocation R_AARCH64_LDST16_ABS_LO12_NC: 0x220001 is not aligned to 2 bytes
-// CHECK-NEXT: improper alignment for relocation R_AARCH64_LDST32_ABS_LO12_NC: 0x220002 is not aligned to 4 bytes
-// CHECK-NEXT: improper alignment for relocation R_AARCH64_LDST64_ABS_LO12_NC: 0x220004 is not aligned to 8 bytes
-// CHECK-NEXT: improper alignment for relocation R_AARCH64_LDST128_ABS_LO12_NC: 0x220008 is not aligned to 16 bytes
+// CHECK: improper alignment for relocation R_AARCH64_LDST16_ABS_LO12_NC: 0x220181 is not aligned to 2 bytes
+// CHECK-NEXT: improper alignment for relocation R_AARCH64_LDST32_ABS_LO12_NC: 0x220182 is not aligned to 4 bytes
+// CHECK-NEXT: improper alignment for relocation R_AARCH64_LDST64_ABS_LO12_NC: 0x220184 is not aligned to 8 bytes
+// CHECK-NEXT: improper alignment for relocation R_AARCH64_LDST128_ABS_LO12_NC: 0x220188 is not aligned to 16 bytes
Modified: lld/trunk/test/ELF/aarch64-load-alignment.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-load-alignment.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-load-alignment.s (original)
+++ lld/trunk/test/ELF/aarch64-load-alignment.s Tue Aug 20 01:34:56 2019
@@ -3,7 +3,7 @@
# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-none %s -o %t.o
# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
-# CHECK: improper alignment for relocation R_AARCH64_LD_PREL_LO19: 0x20005 is not aligned to 4 bytes
+# CHECK: improper alignment for relocation R_AARCH64_LD_PREL_LO19: 0x2007D is not aligned to 4 bytes
ldr x8, patatino
.data
Modified: lld/trunk/test/ELF/aarch64-nopic-plt.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-nopic-plt.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-nopic-plt.s (original)
+++ lld/trunk/test/ELF/aarch64-nopic-plt.s Tue Aug 20 01:34:56 2019
@@ -19,7 +19,7 @@ _start:
// CHECK-NEXT: Section: Undefined
// CHECK: Name: foo
-// CHECK-NEXT: Value: 0x210030
+// CHECK-NEXT: Value: 0x2102F0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: Function
Modified: lld/trunk/test/ELF/aarch64-prel16.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-prel16.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-prel16.s (original)
+++ lld/trunk/test/ELF/aarch64-prel16.s Tue Aug 20 01:34:56 2019
@@ -7,8 +7,8 @@
.globl _start
_start:
.data
- .hword foo - . + 0x210eff
- .hword foo - . + 0x1f8f02
+ .hword foo - . + 0x212057
+ .hword foo - . + 0x1fa05a
// Note: If this test fails, it probably happens because of
// the change of the address of the .data section.
@@ -18,11 +18,11 @@ _start:
// RUN: llvm-objdump -s -section=.data %t2 | FileCheck %s
// CHECK: Contents of section .data:
-// 201000: S = 0x100, A = 0x210eff, P = 0x201000
+// 202158: S = 0x100, A = 0x212157, P = 0x202158
// S + A - P = 0xffff
-// 201002: S = 0x100, A = 0x1f8f02, P = 0x201002
+// 212a5a: S = 0x100, A = 0x1fa05a, P = 0x20215a
// S + A - P = 0x8000
-// CHECK-NEXT: 201000 ffff0080
+// CHECK-NEXT: 202158 ffff0080
// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o %t2 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
// OVERFLOW1: relocation R_AARCH64_PREL16 out of range: -32769 is not in [-32768, 65535]
Modified: lld/trunk/test/ELF/aarch64-prel32.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-prel32.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-prel32.s (original)
+++ lld/trunk/test/ELF/aarch64-prel32.s Tue Aug 20 01:34:56 2019
@@ -7,8 +7,8 @@
.globl _start
_start:
.data
- .word foo - . + 0x100200eff
- .word foo - . - 0x7fdff0fc
+ .word foo - . + 0x100202057
+ .word foo - . - 0x7fdfdfa4
// Note: If this test fails, it probably happens because of
// the change of the address of the .data section.
@@ -18,11 +18,11 @@ _start:
// RUN: llvm-objdump -s -section=.data %t2 | FileCheck %s
// CHECK: Contents of section .data:
-// 201000: S = 0x100, A = 0x100200eff, P = 0x201000
+// 202158: S = 0x100, A = 0x100202057, P = 0x202158
// S + A - P = 0xffffffff
-// 201004: S = 0x100, A = -0x7fdff0fc, P = 0x201004
+// 20215c: S = 0x100, A = -0x7fdfdfa4, P = 0x20215c
// S + A - P = 0x80000000
-// CHECK-NEXT: 201000 ffffffff 00000080
+// CHECK-NEXT: 202158 ffffffff 00000080
// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o %t2 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
// OVERFLOW1: relocation R_AARCH64_PREL32 out of range: -2147483649 is not in [-2147483648, 4294967295]
Modified: lld/trunk/test/ELF/aarch64-relative.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-relative.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-relative.s (original)
+++ lld/trunk/test/ELF/aarch64-relative.s Tue Aug 20 01:34:56 2019
@@ -3,6 +3,7 @@
// RUN: ld.lld %t.o -o %t.so -shared
// RUN: llvm-readobj -r %t.so | FileCheck %s
+.p2align 4
adr x8, .Lfoo // R_AARCH64_ADR_PREL_LO21
adrp x8, .Lfoo // R_AARCH64_ADR_PREL_PG_HI21
strb w9, [x8, :lo12:.Lfoo] // R_AARCH64_LDST8_ABS_LO12_NC
Modified: lld/trunk/test/ELF/aarch64-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-relocs.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-relocs.s (original)
+++ lld/trunk/test/ELF/aarch64-relocs.s Tue Aug 20 01:34:56 2019
@@ -25,14 +25,12 @@ mystr:
.asciz "blah"
.size mystr, 4
-# S = 0x210012, A = 0x4, P = 0x210012
-# PAGE(S + A) = 0x210000
-# PAGE(P) = 0x210000
+# PAGE(S + A) - PAGE(P) = PAGE(210136) - PAGE(0x210132) = 0
#
# CHECK: Disassembly of section .R_AARCH64_ADR_PREL_PG_H121:
# CHECK-EMPTY:
# CHECK-NEXT: $x.2:
-# CHECK-NEXT: 210012: 01 00 00 90 adrp x1, #0
+# CHECK-NEXT: 210132: 01 00 00 90 adrp x1, #0
.section .R_AARCH64_ADD_ABS_LO12_NC,"ax", at progbits
add x0, x0, :lo12:.L.str
@@ -40,14 +38,13 @@ mystr:
.asciz "blah"
.size mystr, 4
-# S = 0x21001b, A = 0x4
-# R = (S + A) & 0xFFF = 0x1f
-# R << 10 = 0x7c00
+# S = 0x21013b, A = 0x4
+# R = (S + A) & 0xFFF = 319
#
# CHECK: Disassembly of section .R_AARCH64_ADD_ABS_LO12_NC:
# CHECK-EMPTY:
# CHECK-NEXT: $x.4:
-# CHECK-NEXT: 21001b: 00 7c 00 91 add x0, x0, #31
+# CHECK-NEXT: 21013b: 00 fc 04 91 add x0, x0, #319
.section .R_AARCH64_LDST64_ABS_LO12_NC,"ax", at progbits
ldr x28, [x27, :lo12:foo]
@@ -55,13 +52,13 @@ foo:
.asciz "foo"
.size mystr, 3
-# S = 0x210024, A = 0x4
-# R = ((S + A) & 0xFFF) << 7 = 0x00001400
-# 0x00001400 | 0xf940177c = 0xf940177c
+# S = 0x210144, A = 0x4
+# R = ((S + A) & 0xFFF) << 7 = 0x0000a400
+# 0x0000a400 | 0xf940177c = 0xf940a77c
# CHECK: Disassembly of section .R_AARCH64_LDST64_ABS_LO12_NC:
# CHECK-EMPTY:
# CHECK-NEXT: $x.6:
-# CHECK-NEXT: 210024: 7c 17 40 f9 ldr x28, [x27, #40]
+# CHECK-NEXT: 210144: 7c a7 40 f9 ldr x28, [x27, #328]
.section .SUB,"ax", at progbits
nop
@@ -71,35 +68,35 @@ sub:
# CHECK: Disassembly of section .SUB:
# CHECK-EMPTY:
# CHECK-NEXT: $x.8:
-# CHECK-NEXT: 21002c: 1f 20 03 d5 nop
+# CHECK-NEXT: 21014c: 1f 20 03 d5 nop
# CHECK: sub:
-# CHECK-NEXT: 210030: 1f 20 03 d5 nop
+# CHECK-NEXT: 210150: 1f 20 03 d5 nop
.section .R_AARCH64_CALL26,"ax", at progbits
call26:
bl sub
-# S = 0x21002c, A = 0x4, P = 0x210034
+# S = 0x21014c, A = 0x4, P = 0x210154
# R = S + A - P = -0x4 = 0xfffffffc
# (R & 0x0ffffffc) >> 2 = 0x03ffffff
# 0x94000000 | 0x03ffffff = 0x97ffffff
# CHECK: Disassembly of section .R_AARCH64_CALL26:
# CHECK-EMPTY:
# CHECK-NEXT: call26:
-# CHECK-NEXT: 210034: ff ff ff 97 bl #-4
+# CHECK-NEXT: 210154: ff ff ff 97 bl #-4
.section .R_AARCH64_JUMP26,"ax", at progbits
jump26:
b sub
-# S = 0x21002c, A = 0x4, P = 0x210038
+# S = 0x21014c, A = 0x4, P = 0x210158
# R = S + A - P = -0x8 = 0xfffffff8
# (R & 0x0ffffffc) >> 2 = 0x03fffffe
# 0x14000000 | 0x03fffffe = 0x17fffffe
# CHECK: Disassembly of section .R_AARCH64_JUMP26:
# CHECK-EMPTY:
# CHECK-NEXT: jump26:
-# CHECK-NEXT: 210038: fe ff ff 17 b #-8
+# CHECK-NEXT: 210158: fe ff ff 17 b #-8
.section .R_AARCH64_LDST32_ABS_LO12_NC,"ax", at progbits
ldst32:
@@ -108,13 +105,13 @@ foo32:
.asciz "foo"
.size mystr, 3
-# S = 0x21003c, A = 0x4
-# R = ((S + A) & 0xFFC) << 8 = 0x00004000
-# 0x00004000 | 0xbd4000a4 = 0xbd4040a4
+# S = 0x21015c, A = 0x4
+# R = ((S + A) & 0xFFC) << 8 = 0x00016000
+# 0x00016000 | 0xbd4000a4 = 0xbd4160a4
# CHECK: Disassembly of section .R_AARCH64_LDST32_ABS_LO12_NC:
# CHECK-EMPTY:
# CHECK-NEXT: ldst32:
-# CHECK-NEXT: 21003c: a4 40 40 bd ldr s4, [x5, #64]
+# CHECK-NEXT: 21015c: a4 60 41 bd ldr s4, [x5, #352]
.section .R_AARCH64_LDST8_ABS_LO12_NC,"ax", at progbits
ldst8:
@@ -123,13 +120,13 @@ foo8:
.asciz "foo"
.size mystr, 3
-# S = 0x210044, A = 0x4
-# R = ((S + A) & 0xFFF) << 10 = 0x00012000
-# 0x00012000 | 0x398001ab = 0x398121ab
+# S = 0x210164, A = 0x4
+# R = ((S + A) & 0xFFF) << 10 = 0x0005a000
+# 0x0005a000 | 0x398001ab = 0x3985a1ab
# CHECK: Disassembly of section .R_AARCH64_LDST8_ABS_LO12_NC:
# CHECK-EMPTY:
# CHECK-NEXT: ldst8:
-# CHECK-NEXT: 210044: ab 21 81 39 ldrsb x11, [x13, #72]
+# CHECK-NEXT: 210164: ab a1 85 39 ldrsb x11, [x13, #360]
.section .R_AARCH64_LDST128_ABS_LO12_NC,"ax", at progbits
ldst128:
@@ -138,15 +135,15 @@ foo128:
.asciz "foo"
.size mystr, 3
-# S = 0x21004c, A = 0x4
-# R = ((S + A) & 0xFF8) << 6 = 0x00001400
-# 0x00001400 | 0x3dc00274 = 0x3dc01674
+# S = 0x21016c, A = 0x4
+# R = ((S + A) & 0xFF8) << 6 = 0x00005c00
+# 0x00005c00 | 0x3dc00274 = 0x3dc05e74
# CHECK: Disassembly of section .R_AARCH64_LDST128_ABS_LO12_NC:
# CHECK-EMPTY:
# CHECK: ldst128:
-# CHECK: 21004c: 74 16 c0 3d ldr q20, [x19, #80]
+# CHECK: 21016c: 74 5e c0 3d ldr q20, [x19, #368]
#foo128:
-# 210050: 66 6f 6f 00 .word
+# 210170: 66 6f 6f 00 .word
.section .R_AARCH64_LDST16_ABS_LO12_NC,"ax", at progbits
ldst16:
@@ -157,15 +154,15 @@ foo16:
.asciz "foo"
.size mystr, 4
-# S = 0x210054, A = 0x4
-# R = ((S + A) & 0x0FFC) << 9 = 0xb000
-# 0xb000 | 0x7d400271 = 0x7d40b271
+# S = 0x210174, A = 0x4
+# R = ((S + A) & 0x0FFC) << 9 = 0x2f000
+# 0x2f000 | 0x7d400271 = 0x7d430271
# CHECK: Disassembly of section .R_AARCH64_LDST16_ABS_LO12_NC:
# CHECK-EMPTY:
# CHECK-NEXT: ldst16:
-# CHECK-NEXT: 210054: 71 c2 40 7d ldr h17, [x19, #96]
-# CHECK-NEXT: 210058: 61 c2 40 79 ldrh w1, [x19, #96]
-# CHECK-NEXT: 21005c: 62 c6 40 79 ldrh w2, [x19, #98]
+# CHECK-NEXT: 210174: 71 02 43 7d ldr h17, [x19, #384]
+# CHECK-NEXT: 210178: 61 02 43 79 ldrh w1, [x19, #384]
+# CHECK-NEXT: 21017c: 62 06 43 79 ldrh w2, [x19, #386]
.section .R_AARCH64_MOVW_UABS,"ax", at progbits
movz1:
@@ -234,24 +231,24 @@ movz1:
# CHECK: Disassembly of section .R_AARCH64_MOVW_PREL:
# CHECK-EMPTY:
# CHECK-NEXT: :
-# CHECK-NEXT: 21009c: 21 00 80 d2 mov x1, #1
-# CHECK-NEXT: 2100a0: 01 00 80 92 mov x1, #-1
-# CHECK-NEXT: 2100a4: 21 00 80 f2 movk x1, #1
-# CHECK-NEXT: 2100a8: e1 ff 9f f2 movk x1, #65535
-# CHECK-NEXT: 2100ac: 42 00 a0 d2 mov x2, #131072
+# CHECK-NEXT: 2101bc: 21 00 80 d2 mov x1, #1
+# CHECK-NEXT: 2101c0: 01 00 80 92 mov x1, #-1
+# CHECK-NEXT: 2101c4: 21 00 80 f2 movk x1, #1
+# CHECK-NEXT: 2101c8: e1 ff 9f f2 movk x1, #65535
+# CHECK-NEXT: 2101cc: 42 00 a0 d2 mov x2, #131072
## -65537 = 0xfffffffffffeffff
-# CHECK-NEXT: 2100b0: 22 00 a0 92 mov x2, #-65537
-# CHECK-NEXT: 2100b4: 42 00 a0 f2 movk x2, #2, lsl #16
-# CHECK-NEXT: 2100b8: c2 ff bf f2 movk x2, #65534, lsl #16
+# CHECK-NEXT: 2101d0: 22 00 a0 92 mov x2, #-65537
+# CHECK-NEXT: 2101d4: 42 00 a0 f2 movk x2, #2, lsl #16
+# CHECK-NEXT: 2101d8: c2 ff bf f2 movk x2, #65534, lsl #16
## 12884901888 = 0x300000000
-# CHECK-NEXT: 2100bc: 63 00 c0 d2 mov x3, #12884901888
+# CHECK-NEXT: 2101dc: 63 00 c0 d2 mov x3, #12884901888
## -8589934593 = #0xfffffffdffffffff
-# CHECK-NEXT: 2100c0: 43 00 c0 92 mov x3, #-8589934593
-# CHECK-NEXT: 2100c4: 63 00 c0 f2 movk x3, #3, lsl #32
-# CHECK-NEXT: 2100c8: a3 ff df f2 movk x3, #65533, lsl #32
-# CHECK-NEXT: 2100cc: 63 00 c0 d2 mov x3, #12884901888
+# CHECK-NEXT: 2101e0: 43 00 c0 92 mov x3, #-8589934593
+# CHECK-NEXT: 2101e4: 63 00 c0 f2 movk x3, #3, lsl #32
+# CHECK-NEXT: 2101e8: a3 ff df f2 movk x3, #65533, lsl #32
+# CHECK-NEXT: 2101ec: 63 00 c0 d2 mov x3, #12884901888
## 1125899906842624 = 0x4000000000000
-# CHECK-NEXT: 2100d0: 84 00 e0 d2 mov x4, #1125899906842624
-# CHECK-NEXT: 2100d4: 84 ff ff d2 mov x4, #-1125899906842624
-# CHECK-NEXT: 2100d8: 84 00 e0 f2 movk x4, #4, lsl #48
-# CHECK-NEXT: 2100dc: 84 ff ff f2 movk x4, #65532, lsl #48
+# CHECK-NEXT: 2101f0: 84 00 e0 d2 mov x4, #1125899906842624
+# CHECK-NEXT: 2101f4: 84 ff ff d2 mov x4, #-1125899906842624
+# CHECK-NEXT: 2101f8: 84 00 e0 f2 movk x4, #4, lsl #48
+# CHECK-NEXT: 2101fc: 84 ff ff f2 movk x4, #65532, lsl #48
Modified: lld/trunk/test/ELF/aarch64-relro.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-relro.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-relro.s (original)
+++ lld/trunk/test/ELF/aarch64-relro.s Tue Aug 20 01:34:56 2019
@@ -5,10 +5,10 @@
# CHECK: Type: PT_GNU_RELRO
# CHECK-NEXT: Offset:
-# CHECK-NEXT: VirtualAddress:
+# CHECK-NEXT: VirtualAddress: 0x220190
# CHECK-NEXT: PhysicalAddress:
# CHECK-NEXT: FileSize:
-# CHECK-NEXT: MemSize: 4096
+# CHECK-NEXT: MemSize: 3696
.section .data.rel.ro,"aw",%progbits
.byte 1
Modified: lld/trunk/test/ELF/aarch64-thunk-section-location.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-thunk-section-location.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-thunk-section-location.s (original)
+++ lld/trunk/test/ELF/aarch64-thunk-section-location.s Tue Aug 20 01:34:56 2019
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-linux-gnu %s -o %t
// RUN: ld.lld %t -o %t2 2>&1
-// RUN: llvm-objdump -d -start-address=136118280 -stop-address=136118292 -triple=aarch64-linux-gnu %t2 | FileCheck %s
+// RUN: llvm-objdump -d --start-address=0x81d1008 -stop-address=0x81d1014 -triple=aarch64-linux-gnu %t2 | FileCheck %s
// Check that the range extension thunks are dumped close to the aarch64 branch
// range of 128 MiB
.section .text.1, "ax", %progbits
@@ -35,7 +35,7 @@ high_target:
ret
// CHECK: __AArch64AbsLongThunk_high_target:
-// CHECK-NEXT: 81d0008: 50 00 00 58 ldr x16, #8
-// CHECK-NEXT: 81d000c: 00 02 1f d6 br x16
+// CHECK-NEXT: 81d1008: 50 00 00 58 ldr x16, #8
+// CHECK-NEXT: 81d100c: 00 02 1f d6 br x16
// CHECK: $d:
-// CHECK-NEXT: 81d0010: 00 10 21 08 .word 0x08211000
+// CHECK-NEXT: 81d1010: 00 20 21 08 .word 0x08212000
Modified: lld/trunk/test/ELF/aarch64-tls-gdie.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-gdie.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-gdie.s (original)
+++ lld/trunk/test/ELF/aarch64-tls-gdie.s Tue Aug 20 01:34:56 2019
@@ -21,14 +21,14 @@ _start:
// SEC-NEXT: SHF_ALLOC
// SEC-NEXT: SHF_WRITE
// SEC-NEXT: ]
-// SEC-NEXT: Address: 0x2200B0
+// SEC-NEXT: Address: 0x220300
-// page(0x2200B0) - page(0x20004) = 65536
-// 0x0B0 = 176
+// page(0x220300) - page(0x21023c) = 65536
+// 0x23c = 768
// CHECK: _start:
-// CHECK-NEXT: 210000: nop
-// CHECK-NEXT: 210004: adrp x0, #65536
-// CHECK-NEXT: 210008: ldr x0, [x0, #176]
-// CHECK-NEXT: 21000c: nop
-// CHECK-NEXT: 210010: nop
+// CHECK-NEXT: 210238: nop
+// CHECK-NEXT: 21023c: adrp x0, #65536
+// CHECK-NEXT: 210240: ldr x0, [x0, #768]
+// CHECK-NEXT: 210244: nop
+// CHECK-NEXT: 210248: nop
Modified: lld/trunk/test/ELF/aarch64-tls-gdle.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-gdle.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-gdle.s (original)
+++ lld/trunk/test/ELF/aarch64-tls-gdle.s Tue Aug 20 01:34:56 2019
@@ -11,10 +11,10 @@
# TCB size = 0x16 and foo is first element from TLS register.
# CHECK-LABEL: _start:
-# CHECK-NEXT: 210000: movz x0, #0, lsl #16
-# CHECK-NEXT: 210004: movk x0, #16
-# CHECK-NEXT: 210008: nop
-# CHECK-NEXT: 21000c: nop
+# CHECK-NEXT: 2101c8: movz x0, #0, lsl #16
+# CHECK-NEXT: 2101cc: movk x0, #16
+# CHECK-NEXT: 2101d0: nop
+# CHECK-NEXT: 2101d4: nop
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-tls-ie.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-ie.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-ie.s (original)
+++ lld/trunk/test/ELF/aarch64-tls-ie.s Tue Aug 20 01:34:56 2019
@@ -14,8 +14,8 @@
# RELOC-NEXT: SHF_ALLOC
# RELOC-NEXT: SHF_WRITE
# RELOC-NEXT: ]
-# RELOC-NEXT: Address: 0x2200B0
-# RELOC-NEXT: Offset: 0x200B0
+# RELOC-NEXT: Address: 0x220338
+# RELOC-NEXT: Offset: 0x338
# RELOC-NEXT: Size: 16
# RELOC-NEXT: Link: 0
# RELOC-NEXT: Info: 0
@@ -24,8 +24,8 @@
# RELOC-NEXT: }
# RELOC: Relocations [
# RELOC-NEXT: Section ({{.*}}) .rela.dyn {
-# RELOC-NEXT: 0x2200B8 R_AARCH64_TLS_TPREL64 bar 0x0
-# RELOC-NEXT: 0x2200B0 R_AARCH64_TLS_TPREL64 foo 0x0
+# RELOC-NEXT: 0x220340 R_AARCH64_TLS_TPREL64 bar 0x0
+# RELOC-NEXT: 0x220338 R_AARCH64_TLS_TPREL64 foo 0x0
# RELOC-NEXT: }
# RELOC-NEXT:]
@@ -34,10 +34,10 @@
## Page(0x2200B8) - Page(0x210000) = 0x10000 = 65536
## 0x2200B8 & 0xff8 = 0xB8 = 184
# CHECK: _start:
-# CHECK-NEXT: 210000: adrp x0, #65536
-# CHECK-NEXT: 210004: ldr x0, [x0, #176]
-# CHECK-NEXT: 210008: adrp x0, #65536
-# CHECK-NEXT: 21000c: ldr x0, [x0, #184]
+# CHECK-NEXT: 210278: adrp x0, #65536
+# CHECK-NEXT: 21027c: ldr x0, [x0, #824]
+# CHECK-NEXT: 210280: adrp x0, #65536
+# CHECK-NEXT: 210284: ldr x0, [x0, #832]
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-tls-le.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-le.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-le.s (original)
+++ lld/trunk/test/ELF/aarch64-tls-le.s Tue Aug 20 01:34:56 2019
@@ -20,12 +20,12 @@ _start:
# TCB size = 0x16 and foo is first element from TLS register.
#CHECK: Disassembly of section .text:
#CHECK: _start:
-#CHECK: 210000: 40 d0 3b d5 mrs x0, TPIDR_EL0
-#CHECK: 210004: 00 00 40 91 add x0, x0, #0, lsl #12
-#CHECK: 210008: 00 40 00 91 add x0, x0, #16
-#CHECK: 21000c: 40 d0 3b d5 mrs x0, TPIDR_EL0
-#CHECK: 210010: 00 fc 7f 91 add x0, x0, #4095, lsl #12
-#CHECK: 210014: 00 e0 3f 91 add x0, x0, #4088
+#CHECK: 210158: 40 d0 3b d5 mrs x0, TPIDR_EL0
+#CHECK: 21015c: 00 00 40 91 add x0, x0, #0, lsl #12
+#CHECK: 210160: 00 40 00 91 add x0, x0, #16
+#CHECK: 210164: 40 d0 3b d5 mrs x0, TPIDR_EL0
+#CHECK: 210168: 00 fc 7f 91 add x0, x0, #4095, lsl #12
+#CHECK: 21016c: 00 e0 3f 91 add x0, x0, #4088
.section .tbss,"awT", at nobits
Added: lld/trunk/test/ELF/aarch64-tls-vaddr-align.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-vaddr-align.s?rev=369344&view=auto
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-vaddr-align.s (added)
+++ lld/trunk/test/ELF/aarch64-tls-vaddr-align.s Tue Aug 20 01:34:56 2019
@@ -0,0 +1,31 @@
+# REQUIRES: aarch64
+
+# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
+# RUN: ld.lld %t.o -o %t
+# RUN: llvm-readelf -S -l %t | FileCheck --check-prefix=SEC %s
+# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DIS %s
+
+# SEC: Name Type Address Off Size ES Flg Lk Inf Al
+# SEC: .tdata PROGBITS 0000000000220200 000200 000001 00 WAT 0 0 1
+# SEC: .tbss NOBITS 0000000000220300 000201 000008 00 WAT 0 0 256
+
+# SEC: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
+# SEC: TLS 0x000200 0x0000000000220200 0x0000000000220200 0x000001 0x000108 R 0x100
+
+## We currently have a hack in Writer.cpp:fixSectionAlignments() to force
+## p_vaddr(PT_TLS)%p_align(PT_TLS)=0, to work around bugs in some dynamic loaders.
+
+## a at tprel = st_value(a) + GAP + (p_vaddr-GAP_ABOVE_TP & p_align-1) =
+## .tbss-.tdata + 16 + GAP_ABOVE_TP + (p_vaddr-GAP_ABOVE_TP & p_align-1) =
+## 0x220300-0x220200 + 16 + (0x220200-16 & 0x100-1) = 512
+# DIS: add x0, x0, #512
+
+add x0, x0, :tprel_lo12_nc:a
+
+.section .tdata,"awT"
+.byte 0
+
+.section .tbss,"awT"
+.p2align 8
+a:
+.quad 0
Modified: lld/trunk/test/ELF/aarch64-tlsdesc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tlsdesc.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tlsdesc.s (original)
+++ lld/trunk/test/ELF/aarch64-tlsdesc.s Tue Aug 20 01:34:56 2019
@@ -15,10 +15,10 @@
// create target specific dynamic TLSDESC relocation where addend is
// the symbol VMA in tls block.
-// CHECK: 10000: adrp x0, #65536
-// CHECK-NEXT: 10004: ldr x1, [x0, #144]
-// CHECK-NEXT: 10008: add x0, x0, #144
-// CHECK-NEXT: 1000c: blr x1
+// CHECK: 10298: adrp x0, #65536
+// CHECK-NEXT: 1029c: ldr x1, [x0, #856]
+// CHECK-NEXT: 102a0: add x0, x0, #856
+// CHECK-NEXT: 102a4: blr x1
adrp x0, :tlsdesc:local1
ldr x1, [x0, :tlsdesc_lo12:local1]
@@ -26,10 +26,10 @@
.tlsdesccall a
blr x1
-// CHECK: 10010: adrp x0, #65536
-// CHECK-NEXT: 10014: ldr x1, [x0, #160]
-// CHECK-NEXT: 10018: add x0, x0, #160
-// CHECK-NEXT: 1001c: blr x1
+// CHECK: 102a8: adrp x0, #65536
+// CHECK-NEXT: 102ac: ldr x1, [x0, #872]
+// CHECK-NEXT: 102b0: add x0, x0, #872
+// CHECK-NEXT: 102b4: blr x1
adrp x0, :tlsdesc:local2
ldr x1, [x0, :tlsdesc_lo12:local2]
@@ -37,10 +37,10 @@
.tlsdesccall a
blr x1
-// CHECK: 10020: adrp x0, #65536
-// CHECK-NEXT: 10024: ldr x1, [x0, #176]
-// CHECK-NEXT: 10028: add x0, x0, #176
-// CHECK-NEXT: 1002c: blr x1
+// CHECK: 102b8: adrp x0, #65536
+// CHECK-NEXT: 102bc: ldr x1, [x0, #888]
+// CHECK-NEXT: 102c0: add x0, x0, #888
+// CHECK-NEXT: 102c4: blr x1
.section .tbss,"awT", at nobits
.type local1, at object
@@ -65,8 +65,8 @@ local2:
// REL: Relocations [
// REL-NEXT: Section (4) .rela.dyn {
-// REL-NEXT: 0x200A0 R_AARCH64_TLSDESC - 0x0
-// REL-NEXT: 0x200B0 R_AARCH64_TLSDESC - 0x8
-// REL-NEXT: 0x20090 R_AARCH64_TLSDESC a 0x0
+// REL-NEXT: 0x20368 R_AARCH64_TLSDESC - 0x0
+// REL-NEXT: 0x20378 R_AARCH64_TLSDESC - 0x8
+// REL-NEXT: 0x20358 R_AARCH64_TLSDESC a 0x0
// REL-NEXT: }
// REL-NEXT: ]
Modified: lld/trunk/test/ELF/aarch64-tlsld-ldst.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tlsld-ldst.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tlsld-ldst.s (original)
+++ lld/trunk/test/ELF/aarch64-tlsld-ldst.s Tue Aug 20 01:34:56 2019
@@ -25,22 +25,22 @@ _start: mrs x8, TPIDR_EL0
ldrb w0, [x8, :tprel_lo12_nc:var4]
// CHECK: _start:
-// CHECK-NEXT: 210000: mrs x8, TPIDR_EL0
+// CHECK-NEXT: 210158: mrs x8, TPIDR_EL0
// 0x0 + c10 = 0xc10 = tcb (16-bytes) + var0
-// CHECK-NEXT: 210004: add x8, x8, #0, lsl #12
-// CHECK-NEXT: 210008: ldr q20, [x8, #3088]
+// CHECK-NEXT: 21015c: add x8, x8, #0, lsl #12
+// CHECK-NEXT: 210160: ldr q20, [x8, #3088]
// 0x1000 + 0x820 = 0x1820 = tcb + var1
-// CHECK-NEXT: 21000c: add x8, x8, #1, lsl #12
-// CHECK-NEXT: 210010: ldr x0, [x8, #2080]
+// CHECK-NEXT: 210164: add x8, x8, #1, lsl #12
+// CHECK-NEXT: 210168: ldr x0, [x8, #2080]
// 0x2000 + 0x428 = 0x2428 = tcb + var2
-// CHECK-NEXT: 210014: add x8, x8, #2, lsl #12
-// CHECK-NEXT: 210018: ldr w0, [x8, #1064]
+// CHECK-NEXT: 21016c: add x8, x8, #2, lsl #12
+// CHECK-NEXT: 210170: ldr w0, [x8, #1064]
// 0x3000 + 0x2c = 0x302c = tcb + var3
-// CHECK-NEXT: 21001c: add x8, x8, #3, lsl #12
-// CHECK-NEXT: 210020: ldrh w0, [x8, #44]
+// CHECK-NEXT: 210174: add x8, x8, #3, lsl #12
+// CHECK-NEXT: 210178: ldrh w0, [x8, #44]
// 0x3000 + 0xc2e = 0x32ce = tcb + var4
-// CHECK-NEXT: 210024: add x8, x8, #3, lsl #12
-// CHECK-NEXT: 210028: ldrb w0, [x8, #3118]
+// CHECK-NEXT: 21017c: add x8, x8, #3, lsl #12
+// CHECK-NEXT: 210180: ldrb w0, [x8, #3118]
// CHECK-SYMS: 0000000000000c00 0 TLS GLOBAL DEFAULT 2 var0
// CHECK-SYMS-NEXT: 0000000000001810 4 TLS GLOBAL DEFAULT 2 var1
Modified: lld/trunk/test/ELF/aarch64-tstbr14-reloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tstbr14-reloc.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tstbr14-reloc.s (original)
+++ lld/trunk/test/ELF/aarch64-tstbr14-reloc.s Tue Aug 20 01:34:56 2019
@@ -7,26 +7,20 @@
# RUN: llvm-objdump -d --no-show-raw-insn %t3 | FileCheck -check-prefix=DSO %s
# RUN: llvm-readobj -S -r %t3 | FileCheck -check-prefix=DSOREL %s
-# 0x1101c - 28 = 0x20000
-# 0x11020 - 16 = 0x20010
-# 0x11024 - 36 = 0x20000
-# 0x11028 - 24 = 0x20010
-# CHECK: Disassembly of section .text:
-# CHECK-EMPTY:
-# CHECK-NEXT: _foo:
-# CHECK-NEXT: 210000: nop
-# CHECK-NEXT: 210004: nop
-# CHECK-NEXT: 210008: nop
-# CHECK-NEXT: 21000c: nop
+# CHECK: _foo:
+# CHECK-NEXT: 210120: nop
+# CHECK-NEXT: 210124: nop
+# CHECK-NEXT: 210128: nop
+# CHECK-NEXT: 21012c: nop
# CHECK: _bar:
-# CHECK-NEXT: 210010: nop
-# CHECK-NEXT: 210014: nop
-# CHECK-NEXT: 210018: nop
+# CHECK-NEXT: 210130: nop
+# CHECK-NEXT: 210134: nop
+# CHECK-NEXT: 210138: nop
# CHECK: _start:
-# CHECK-NEXT: 21001c: tbnz w3, #15, #-28
-# CHECK-NEXT: 210020: tbnz w3, #15, #-16
-# CHECK-NEXT: 210024: tbz x6, #45, #-36
-# CHECK-NEXT: 210028: tbz x6, #45, #-24
+# CHECK-NEXT: 21013c: tbnz w3, #15, #-28 <_foo>
+# CHECK-NEXT: 210140: tbnz w3, #15, #-16 <_bar>
+# CHECK-NEXT: 210144: tbz x6, #45, #-36 <_foo>
+# CHECK-NEXT: 210148: tbz x6, #45, #-24 <_bar>
#DSOREL: Section {
#DSOREL: Index:
@@ -36,8 +30,8 @@
#DSOREL-NEXT: SHF_ALLOC
#DSOREL-NEXT: SHF_WRITE
#DSOREL-NEXT: ]
-#DSOREL-NEXT: Address: 0x30000
-#DSOREL-NEXT: Offset: 0x30000
+#DSOREL-NEXT: Address: 0x30420
+#DSOREL-NEXT: Offset: 0x420
#DSOREL-NEXT: Size: 40
#DSOREL-NEXT: Link: 0
#DSOREL-NEXT: Info: 0
@@ -46,55 +40,51 @@
#DSOREL-NEXT: }
#DSOREL: Relocations [
#DSOREL-NEXT: Section ({{.*}}) .rela.plt {
-#DSOREL-NEXT: 0x30018 R_AARCH64_JUMP_SLOT _foo
-#DSOREL-NEXT: 0x30020 R_AARCH64_JUMP_SLOT _bar
+#DSOREL-NEXT: 0x30438 R_AARCH64_JUMP_SLOT _foo
+#DSOREL-NEXT: 0x30440 R_AARCH64_JUMP_SLOT _bar
#DSOREL-NEXT: }
#DSOREL-NEXT:]
#DSO: Disassembly of section .text:
#DSO-EMPTY:
#DSO-NEXT: _foo:
-#DSO-NEXT: 10000: nop
-#DSO-NEXT: 10004: nop
-#DSO-NEXT: 10008: nop
-#DSO-NEXT: 1000c: nop
+#DSO-NEXT: 102f8: nop
+#DSO-NEXT: 102fc: nop
+#DSO-NEXT: 10300: nop
+#DSO-NEXT: 10304: nop
#DSO: _bar:
-#DSO-NEXT: 10010: nop
-#DSO-NEXT: 10014: nop
-#DSO-NEXT: 10018: nop
+#DSO-NEXT: 10308: nop
+#DSO-NEXT: 1030c: nop
+#DSO-NEXT: 10310: nop
#DSO: _start:
-# 0x1001c + 52 = 0x10050 = PLT[1]
-# 0x10020 + 64 = 0x10060 = PLT[2]
-# 0x10024 + 44 = 0x10050 = PLT[1]
-# 0x10028 + 56 = 0x10060 = PLT[2]
-#DSO-NEXT: 1001c: tbnz w3, #15, #52
-#DSO-NEXT: 10020: tbnz w3, #15, #64
-#DSO-NEXT: 10024: tbz x6, #45, #44
-#DSO-NEXT: 10028: tbz x6, #45, #56
+#DSO-NEXT: 10314: tbnz w3, #15, #60 <_foo at plt>
+#DSO-NEXT: 10318: tbnz w3, #15, #72 <_bar at plt>
+#DSO-NEXT: 1031c: tbz x6, #45, #52 <_foo at plt>
+#DSO-NEXT: 10320: tbz x6, #45, #64 <_bar at plt>
#DSO-EMPTY:
#DSO-NEXT: Disassembly of section .plt:
#DSO-EMPTY:
#DSO-NEXT: .plt:
-#DSO-NEXT: 10030: stp x16, x30, [sp, #-16]!
-#DSO-NEXT: 10034: adrp x16, #131072
-#DSO-NEXT: 10038: ldr x17, [x16, #16]
-#DSO-NEXT: 1003c: add x16, x16, #16
-#DSO-NEXT: 10040: br x17
-#DSO-NEXT: 10044: nop
-#DSO-NEXT: 10048: nop
-#DSO-NEXT: 1004c: nop
+#DSO-NEXT: 10330: stp x16, x30, [sp, #-16]!
+#DSO-NEXT: 10334: adrp x16, #131072
+#DSO-NEXT: 10338: ldr x17, [x16, #1072]
+#DSO-NEXT: 1033c: add x16, x16, #1072
+#DSO-NEXT: 10340: br x17
+#DSO-NEXT: 10344: nop
+#DSO-NEXT: 10348: nop
+#DSO-NEXT: 1034c: nop
#DSO-EMPTY:
#DSO-NEXT: _foo at plt:
-#DSO-NEXT: 10050: adrp x16, #131072
-#DSO-NEXT: 10054: ldr x17, [x16, #24]
-#DSO-NEXT: 10058: add x16, x16, #24
-#DSO-NEXT: 1005c: br x17
+#DSO-NEXT: 10350: adrp x16, #131072
+#DSO-NEXT: 10354: ldr x17, [x16, #1080]
+#DSO-NEXT: 10358: add x16, x16, #1080
+#DSO-NEXT: 1035c: br x17
#DSO-EMPTY:
#DSO-NEXT: _bar at plt:
-#DSO-NEXT: 10060: adrp x16, #131072
-#DSO-NEXT: 10064: ldr x17, [x16, #32]
-#DSO-NEXT: 10068: add x16, x16, #32
-#DSO-NEXT: 1006c: br x17
+#DSO-NEXT: 10360: adrp x16, #131072
+#DSO-NEXT: 10364: ldr x17, [x16, #1088]
+#DSO-NEXT: 10368: add x16, x16, #1088
+#DSO-NEXT: 1036c: br x17
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-undefined-weak.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-undefined-weak.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-undefined-weak.s (original)
+++ lld/trunk/test/ELF/aarch64-undefined-weak.s Tue Aug 20 01:34:56 2019
@@ -36,15 +36,15 @@ _start:
// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// 2162688 = 0x210000
-// CHECK: 210000: b #4
-// CHECK-NEXT: 210004: bl #4
-// CHECK-NEXT: 210008: b.eq #4
-// CHECK-NEXT: 21000c: cbz x1, #4
-// CHECK-NEXT: 210010: adr x0, #0
-// CHECK-NEXT: 210014: adrp x0, #0
-// CHECK: 210018: 00 00 00 00 .word 0x00000000
-// CHECK-NEXT: 21001c: 00 00 00 00 .word 0x00000000
-// CHECK-NEXT: 210020: 00 00 00 00 .word 0x00000000
-// CHECK-NEXT: 210024: 00 00 .short 0x0000
+// CHECK: 210120: b #4
+// CHECK-NEXT: 210124: bl #4
+// CHECK-NEXT: 210128: b.eq #4
+// CHECK-NEXT: 21012c: cbz x1, #4
+// CHECK-NEXT: 210130: adr x0, #0
+// CHECK-NEXT: 210134: adrp x0, #0
+// CHECK: 210138: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 21013c: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 210140: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 210144: 00 00 .short 0x0000
// CHECK: $x.2:
-// CHECK-NEXT: 210026: ldr x8, #0
+// CHECK-NEXT: 210146: ldr x8, #0
Modified: lld/trunk/test/ELF/basic-aarch64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic-aarch64.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic-aarch64.s (original)
+++ lld/trunk/test/ELF/basic-aarch64.s Tue Aug 20 01:34:56 2019
@@ -26,7 +26,7 @@ _start:
# CHECK-NEXT: Version: 1
# CHECK-NEXT: Entry: [[ENTRY:0x[0-9A-F]+]]
# CHECK-NEXT: ProgramHeaderOffset: 0x40
-# CHECK-NEXT: SectionHeaderOffset: 0x10098
+# CHECK-NEXT: SectionHeaderOffset: 0x1B8
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: HeaderSize: 64
@@ -59,8 +59,8 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_EXECINSTR (0x4)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x210000
-# CHECK-NEXT: Offset: 0x10000
+# CHECK-NEXT: Address: 0x210120
+# CHECK-NEXT: Offset: 0x120
# CHECK-NEXT: Size: 12
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
@@ -76,7 +76,7 @@ _start:
# CHECK-NEXT: SHF_STRINGS (0x20)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
-# CHECK-NEXT: Offset: 0x1000C
+# CHECK-NEXT: Offset: 0x12C
# CHECK-NEXT: Size: 8
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
@@ -90,7 +90,7 @@ _start:
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
-# CHECK-NEXT: Offset: 0x10018
+# CHECK-NEXT: Offset: 0x138
# CHECK-NEXT: Size: 72
# CHECK-NEXT: Link: 5
# CHECK-NEXT: Info: 2
@@ -104,7 +104,7 @@ _start:
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
-# CHECK-NEXT: Offset: 0x10060
+# CHECK-NEXT: Offset: 0x180
# CHECK-NEXT: Size: 42
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
@@ -118,7 +118,7 @@ _start:
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
-# CHECK-NEXT: Offset: 0x1008A
+# CHECK-NEXT: Offset: 0x1AA
# CHECK-NEXT: Size: 13
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
@@ -138,7 +138,7 @@ _start:
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: $x.0
-# CHECK-NEXT: Value: 0x210000
+# CHECK-NEXT: Value: 0x210120
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Binding: Local (0x0)
# CHECK-NEXT: Type: None (0x0)
@@ -159,8 +159,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_PHDR (0x6)
# CHECK-NEXT: Offset: 0x40
-# CHECK-NEXT: VirtualAddress: 0x200040
-# CHECK-NEXT: PhysicalAddress: 0x200040
+# CHECK-NEXT: VirtualAddress: 0x210040
+# CHECK-NEXT: PhysicalAddress: 0x210040
# CHECK-NEXT: FileSize: 224
# CHECK-NEXT: MemSize: 224
# CHECK-NEXT: Flags [ (0x4)
@@ -171,8 +171,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x0
-# CHECK-NEXT: VirtualAddress: 0x200000
-# CHECK-NEXT: PhysicalAddress: 0x200000
+# CHECK-NEXT: VirtualAddress: 0x210000
+# CHECK-NEXT: PhysicalAddress: 0x210000
# CHECK-NEXT: FileSize: 288
# CHECK-NEXT: MemSize: 288
# CHECK-NEXT: Flags [
@@ -182,9 +182,9 @@ _start:
# CHECK-NEXT: }
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
-# CHECK-NEXT: Offset: 0x1000
-# CHECK-NEXT: VirtualAddress: 0x210000
-# CHECK-NEXT: PhysicalAddress: 0x210000
+# CHECK-NEXT: Offset: 0x120
+# CHECK-NEXT: VirtualAddress: 0x210120
+# CHECK-NEXT: PhysicalAddress: 0x210120
# CHECK-NEXT: FileSize: 12
# CHECK-NEXT: MemSize: 12
# CHECK-NEXT: Flags [ (0x5)
Modified: lld/trunk/test/ELF/global-offset-table-position-aarch64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/global-offset-table-position-aarch64.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/global-offset-table-position-aarch64.s (original)
+++ lld/trunk/test/ELF/global-offset-table-position-aarch64.s Tue Aug 20 01:34:56 2019
@@ -20,7 +20,7 @@ _start:
.long _GLOBAL_OFFSET_TABLE_ - .
// CHECK: Name: _GLOBAL_OFFSET_TABLE_ (11)
-// CHECK-NEXT: Value: 0x30008
+// CHECK-NEXT: Value: 0x30360
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local (0x0)
// CHECK-NEXT: Type: None (0x0)
Modified: lld/trunk/test/ELF/pack-dyn-relocs-loop.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/pack-dyn-relocs-loop.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/pack-dyn-relocs-loop.s (original)
+++ lld/trunk/test/ELF/pack-dyn-relocs-loop.s Tue Aug 20 01:34:56 2019
@@ -1,7 +1,7 @@
// REQUIRES: arm, aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-android %s -o %t.o
-// RUN: ld.lld -shared %t.o -o %t.so --pack-dyn-relocs=android -z norelro
+// RUN: ld.lld -shared %t.o -o %t.so --pack-dyn-relocs=android -z norelro -z separate-code
// RUN: llvm-readobj -S %t.so | FileCheck %s
// This test is making sure the Android packed relocation support doesn't
Modified: lld/trunk/test/ELF/pack-dyn-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/pack-dyn-relocs.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/pack-dyn-relocs.s (original)
+++ lld/trunk/test/ELF/pack-dyn-relocs.s Tue Aug 20 01:34:56 2019
@@ -1,7 +1,7 @@
// REQUIRES: arm, aarch64
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %p/Inputs/arm-shared.s -o %t.a32.so.o
-// RUN: ld.lld -shared %t.a32.so.o -o %t.a32.so
+// RUN: ld.lld -shared %t.a32.so.o -soname=so -o %t.a32.so
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.a32
// RUN: ld.lld -pie --pack-dyn-relocs=none %t.a32 %t.a32.so -o %t2.a32
// RUN: llvm-readobj -r %t2.a32 | FileCheck --check-prefix=UNPACKED32 %s
@@ -168,42 +168,42 @@
// RELR32-NEXT: }
// RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/shared2.s -o %t.a64.so.o
-// RUN: ld.lld -shared %t.a64.so.o -o %t.a64.so
+// RUN: ld.lld -shared %t.a64.so.o -soname=so -o %t.a64.so
// RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %t.a64
// RUN: ld.lld -pie --pack-dyn-relocs=none %t.a64 %t.a64.so -o %t2.a64
// RUN: llvm-readobj -r %t2.a64 | FileCheck --check-prefix=UNPACKED64 %s
// UNPACKED64: Section ({{.+}}) .rela.dyn {
-// UNPACKED64-NEXT: 0x20000 R_AARCH64_RELATIVE - 0x1
-// UNPACKED64-NEXT: 0x20008 R_AARCH64_RELATIVE - 0x2
-// UNPACKED64-NEXT: 0x20010 R_AARCH64_RELATIVE - 0x3
-// UNPACKED64-NEXT: 0x20018 R_AARCH64_RELATIVE - 0x4
-// UNPACKED64-NEXT: 0x20020 R_AARCH64_RELATIVE - 0x5
-// UNPACKED64-NEXT: 0x20028 R_AARCH64_RELATIVE - 0x6
-// UNPACKED64-NEXT: 0x20030 R_AARCH64_RELATIVE - 0x7
-// UNPACKED64-NEXT: 0x20038 R_AARCH64_RELATIVE - 0x8
-
-// UNPACKED64-NEXT: 0x20048 R_AARCH64_RELATIVE - 0x1
-// UNPACKED64-NEXT: 0x20050 R_AARCH64_RELATIVE - 0x2
-// UNPACKED64-NEXT: 0x20058 R_AARCH64_RELATIVE - 0x3
-// UNPACKED64-NEXT: 0x20060 R_AARCH64_RELATIVE - 0x4
-// UNPACKED64-NEXT: 0x20068 R_AARCH64_RELATIVE - 0x5
-// UNPACKED64-NEXT: 0x20070 R_AARCH64_RELATIVE - 0x6
-// UNPACKED64-NEXT: 0x20078 R_AARCH64_RELATIVE - 0x7
-
-// UNPACKED64-NEXT: 0x20088 R_AARCH64_RELATIVE - 0x1
-// UNPACKED64-NEXT: 0x20090 R_AARCH64_RELATIVE - 0x2
-// UNPACKED64-NEXT: 0x20098 R_AARCH64_RELATIVE - 0x3
-// UNPACKED64-NEXT: 0x200A0 R_AARCH64_RELATIVE - 0x4
-// UNPACKED64-NEXT: 0x200A8 R_AARCH64_RELATIVE - 0x5
-// UNPACKED64-NEXT: 0x200B0 R_AARCH64_RELATIVE - 0x6
-// UNPACKED64-NEXT: 0x200B8 R_AARCH64_RELATIVE - 0x7
-// UNPACKED64-NEXT: 0x200C0 R_AARCH64_RELATIVE - 0x8
-// UNPACKED64-NEXT: 0x200C8 R_AARCH64_RELATIVE - 0x9
-
-// UNPACKED64-NEXT: 0x200D1 R_AARCH64_RELATIVE - 0xA
-// UNPACKED64-NEXT: 0x20040 R_AARCH64_ABS64 bar2 0x1
-// UNPACKED64-NEXT: 0x20080 R_AARCH64_ABS64 zed2 0x0
+// UNPACKED64-NEXT: 0x305F0 R_AARCH64_RELATIVE - 0x1
+// UNPACKED64-NEXT: 0x305F8 R_AARCH64_RELATIVE - 0x2
+// UNPACKED64-NEXT: 0x30600 R_AARCH64_RELATIVE - 0x3
+// UNPACKED64-NEXT: 0x30608 R_AARCH64_RELATIVE - 0x4
+// UNPACKED64-NEXT: 0x30610 R_AARCH64_RELATIVE - 0x5
+// UNPACKED64-NEXT: 0x30618 R_AARCH64_RELATIVE - 0x6
+// UNPACKED64-NEXT: 0x30620 R_AARCH64_RELATIVE - 0x7
+// UNPACKED64-NEXT: 0x30628 R_AARCH64_RELATIVE - 0x8
+
+// UNPACKED64-NEXT: 0x30638 R_AARCH64_RELATIVE - 0x1
+// UNPACKED64-NEXT: 0x30640 R_AARCH64_RELATIVE - 0x2
+// UNPACKED64-NEXT: 0x30648 R_AARCH64_RELATIVE - 0x3
+// UNPACKED64-NEXT: 0x30650 R_AARCH64_RELATIVE - 0x4
+// UNPACKED64-NEXT: 0x30658 R_AARCH64_RELATIVE - 0x5
+// UNPACKED64-NEXT: 0x30660 R_AARCH64_RELATIVE - 0x6
+// UNPACKED64-NEXT: 0x30668 R_AARCH64_RELATIVE - 0x7
+
+// UNPACKED64-NEXT: 0x30678 R_AARCH64_RELATIVE - 0x1
+// UNPACKED64-NEXT: 0x30680 R_AARCH64_RELATIVE - 0x2
+// UNPACKED64-NEXT: 0x30688 R_AARCH64_RELATIVE - 0x3
+// UNPACKED64-NEXT: 0x30690 R_AARCH64_RELATIVE - 0x4
+// UNPACKED64-NEXT: 0x30698 R_AARCH64_RELATIVE - 0x5
+// UNPACKED64-NEXT: 0x306A0 R_AARCH64_RELATIVE - 0x6
+// UNPACKED64-NEXT: 0x306A8 R_AARCH64_RELATIVE - 0x7
+// UNPACKED64-NEXT: 0x306B0 R_AARCH64_RELATIVE - 0x8
+// UNPACKED64-NEXT: 0x306B8 R_AARCH64_RELATIVE - 0x9
+
+// UNPACKED64-NEXT: 0x306C1 R_AARCH64_RELATIVE - 0xA
+// UNPACKED64-NEXT: 0x30630 R_AARCH64_ABS64 bar2 0x1
+// UNPACKED64-NEXT: 0x30670 R_AARCH64_ABS64 zed2 0x0
// UNPACKED64-NEXT: }
// RUN: ld.lld -pie --pack-dyn-relocs=android %t.a64 %t.a64.so -o %t3.a64
@@ -230,36 +230,36 @@
// ANDROID64-HEADERS: 0x0000000060000012 ANDROID_RELASZ [[SIZE]]
// ANDROID64: Section ({{.+}}) .rela.dyn {
-// ANDROID64-NEXT: 0x20000 R_AARCH64_RELATIVE - 0x1
-// ANDROID64-NEXT: 0x20008 R_AARCH64_RELATIVE - 0x2
-// ANDROID64-NEXT: 0x20010 R_AARCH64_RELATIVE - 0x3
-// ANDROID64-NEXT: 0x20018 R_AARCH64_RELATIVE - 0x4
-// ANDROID64-NEXT: 0x20020 R_AARCH64_RELATIVE - 0x5
-// ANDROID64-NEXT: 0x20028 R_AARCH64_RELATIVE - 0x6
-// ANDROID64-NEXT: 0x20030 R_AARCH64_RELATIVE - 0x7
-// ANDROID64-NEXT: 0x20038 R_AARCH64_RELATIVE - 0x8
-
-// ANDROID64-NEXT: 0x20088 R_AARCH64_RELATIVE - 0x1
-// ANDROID64-NEXT: 0x20090 R_AARCH64_RELATIVE - 0x2
-// ANDROID64-NEXT: 0x20098 R_AARCH64_RELATIVE - 0x3
-// ANDROID64-NEXT: 0x200A0 R_AARCH64_RELATIVE - 0x4
-// ANDROID64-NEXT: 0x200A8 R_AARCH64_RELATIVE - 0x5
-// ANDROID64-NEXT: 0x200B0 R_AARCH64_RELATIVE - 0x6
-// ANDROID64-NEXT: 0x200B8 R_AARCH64_RELATIVE - 0x7
-// ANDROID64-NEXT: 0x200C0 R_AARCH64_RELATIVE - 0x8
-// ANDROID64-NEXT: 0x200C8 R_AARCH64_RELATIVE - 0x9
-
-// ANDROID64-NEXT: 0x20048 R_AARCH64_RELATIVE - 0x1
-// ANDROID64-NEXT: 0x20050 R_AARCH64_RELATIVE - 0x2
-// ANDROID64-NEXT: 0x20058 R_AARCH64_RELATIVE - 0x3
-// ANDROID64-NEXT: 0x20060 R_AARCH64_RELATIVE - 0x4
-// ANDROID64-NEXT: 0x20068 R_AARCH64_RELATIVE - 0x5
-// ANDROID64-NEXT: 0x20070 R_AARCH64_RELATIVE - 0x6
-// ANDROID64-NEXT: 0x20078 R_AARCH64_RELATIVE - 0x7
-
-// ANDROID64-NEXT: 0x200D1 R_AARCH64_RELATIVE - 0xA
-// ANDROID64-NEXT: 0x20040 R_AARCH64_ABS64 bar2 0x1
-// ANDROID64-NEXT: 0x20080 R_AARCH64_ABS64 zed2 0x0
+// ANDROID64-NEXT: 0x303C0 R_AARCH64_RELATIVE - 0x1
+// ANDROID64-NEXT: 0x303C8 R_AARCH64_RELATIVE - 0x2
+// ANDROID64-NEXT: 0x303D0 R_AARCH64_RELATIVE - 0x3
+// ANDROID64-NEXT: 0x303D8 R_AARCH64_RELATIVE - 0x4
+// ANDROID64-NEXT: 0x303E0 R_AARCH64_RELATIVE - 0x5
+// ANDROID64-NEXT: 0x303E8 R_AARCH64_RELATIVE - 0x6
+// ANDROID64-NEXT: 0x303F0 R_AARCH64_RELATIVE - 0x7
+// ANDROID64-NEXT: 0x303F8 R_AARCH64_RELATIVE - 0x8
+
+// ANDROID64-NEXT: 0x30448 R_AARCH64_RELATIVE - 0x1
+// ANDROID64-NEXT: 0x30450 R_AARCH64_RELATIVE - 0x2
+// ANDROID64-NEXT: 0x30458 R_AARCH64_RELATIVE - 0x3
+// ANDROID64-NEXT: 0x30460 R_AARCH64_RELATIVE - 0x4
+// ANDROID64-NEXT: 0x30468 R_AARCH64_RELATIVE - 0x5
+// ANDROID64-NEXT: 0x30470 R_AARCH64_RELATIVE - 0x6
+// ANDROID64-NEXT: 0x30478 R_AARCH64_RELATIVE - 0x7
+// ANDROID64-NEXT: 0x30480 R_AARCH64_RELATIVE - 0x8
+// ANDROID64-NEXT: 0x30488 R_AARCH64_RELATIVE - 0x9
+
+// ANDROID64-NEXT: 0x30408 R_AARCH64_RELATIVE - 0x1
+// ANDROID64-NEXT: 0x30410 R_AARCH64_RELATIVE - 0x2
+// ANDROID64-NEXT: 0x30418 R_AARCH64_RELATIVE - 0x3
+// ANDROID64-NEXT: 0x30420 R_AARCH64_RELATIVE - 0x4
+// ANDROID64-NEXT: 0x30428 R_AARCH64_RELATIVE - 0x5
+// ANDROID64-NEXT: 0x30430 R_AARCH64_RELATIVE - 0x6
+// ANDROID64-NEXT: 0x30438 R_AARCH64_RELATIVE - 0x7
+
+// ANDROID64-NEXT: 0x30491 R_AARCH64_RELATIVE - 0xA
+// ANDROID64-NEXT: 0x30400 R_AARCH64_ABS64 bar2 0x1
+// ANDROID64-NEXT: 0x30440 R_AARCH64_ABS64 zed2 0x0
// ANDROID64-NEXT: }
// RUN: ld.lld -pie --pack-dyn-relocs=relr %t.a64 %t.a64.so -o %t4.a64
@@ -290,7 +290,7 @@
// SHT_RELR section contains address/bitmap entries
// encoding the offsets for relative relocation.
// RAW-RELR64: Section ({{.+}}) .relr.dyn {
-// RAW-RELR64-NEXT: 0x20000
+// RAW-RELR64-NEXT: 0x303F0
// RAW-RELR64-NEXT: 0x3FEFEFF
// RAW-RELR64-NEXT: }
@@ -298,37 +298,37 @@
// but contains only the relative relocations.
// Any relative relocations with odd offset stay in SHT_RELA.
// RELR64: Section ({{.+}}) .rela.dyn {
-// RELR64-NEXT: 0x200D1 R_AARCH64_RELATIVE - 0xA
-// RELR64-NEXT: 0x20040 R_AARCH64_ABS64 bar2 0x1
-// RELR64-NEXT: 0x20080 R_AARCH64_ABS64 zed2 0x0
+// RELR64-NEXT: 0x304C1 R_AARCH64_RELATIVE - 0xA
+// RELR64-NEXT: 0x30430 R_AARCH64_ABS64 bar2 0x1
+// RELR64-NEXT: 0x30470 R_AARCH64_ABS64 zed2 0x0
// RELR64-NEXT: }
// RELR64-NEXT: Section ({{.+}}) .relr.dyn {
-// RELR64-NEXT: 0x20000 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20008 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20010 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20018 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20020 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20028 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20030 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20038 R_AARCH64_RELATIVE - 0x0
-
-// RELR64-NEXT: 0x20048 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20050 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20058 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20060 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20068 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20070 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20078 R_AARCH64_RELATIVE - 0x0
-
-// RELR64-NEXT: 0x20088 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20090 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x20098 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x200A0 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x200A8 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x200B0 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x200B8 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x200C0 R_AARCH64_RELATIVE - 0x0
-// RELR64-NEXT: 0x200C8 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x303F0 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x303F8 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30400 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30408 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30410 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30418 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30420 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30428 R_AARCH64_RELATIVE - 0x0
+
+// RELR64-NEXT: 0x30438 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30440 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30448 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30450 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30458 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30460 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30468 R_AARCH64_RELATIVE - 0x0
+
+// RELR64-NEXT: 0x30478 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30480 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30488 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30490 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x30498 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x304A0 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x304A8 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x304B0 R_AARCH64_RELATIVE - 0x0
+// RELR64-NEXT: 0x304B8 R_AARCH64_RELATIVE - 0x0
// RELR64-NEXT: }
.data
Modified: lld/trunk/test/ELF/plt-aarch64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/plt-aarch64.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/plt-aarch64.s (original)
+++ lld/trunk/test/ELF/plt-aarch64.s Tue Aug 20 01:34:56 2019
@@ -1,15 +1,15 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %p/Inputs/plt-aarch64.s -o %t2.o
-// RUN: ld.lld -shared %t2.o -o %t2.so
+// RUN: ld.lld -shared %t2.o -soname=t2.so -o %t2.so
// RUN: ld.lld -shared %t.o %t2.so -o %t.so
// RUN: ld.lld %t.o %t2.so -o %t.exe
// RUN: llvm-readobj -S -r %t.so | FileCheck --check-prefix=CHECKDSO %s
// RUN: llvm-objdump -s -section=.got.plt %t.so | FileCheck --check-prefix=DUMPDSO %s
-// RUN: llvm-objdump -d %t.so | FileCheck --check-prefix=DISASMDSO %s
+// RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t.so | FileCheck --check-prefix=DISASMDSO %s
// RUN: llvm-readobj -S -r %t.exe | FileCheck --check-prefix=CHECKEXE %s
// RUN: llvm-objdump -s -section=.got.plt %t.exe | FileCheck --check-prefix=DUMPEXE %s
-// RUN: llvm-objdump -d %t.exe | FileCheck --check-prefix=DISASMEXE %s
+// RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t.exe | FileCheck --check-prefix=DISASMEXE %s
// CHECKDSO: Name: .plt
// CHECKDSO-NEXT: Type: SHT_PROGBITS
@@ -17,7 +17,7 @@
// CHECKDSO-NEXT: SHF_ALLOC
// CHECKDSO-NEXT: SHF_EXECINSTR
// CHECKDSO-NEXT: ]
-// CHECKDSO-NEXT: Address: 0x10010
+// CHECKDSO-NEXT: Address: 0x10340
// CHECKDSO-NEXT: Offset:
// CHECKDSO-NEXT: Size: 80
// CHECKDSO-NEXT: Link:
@@ -30,7 +30,7 @@
// CHECKDSO-NEXT: SHF_ALLOC
// CHECKDSO-NEXT: SHF_WRITE
// CHECKDSO-NEXT: ]
-// CHECKDSO-NEXT: Address: 0x30000
+// CHECKDSO-NEXT: Address: 0x30450
// CHECKDSO-NEXT: Offset:
// CHECKDSO-NEXT: Size: 48
// CHECKDSO-NEXT: Link:
@@ -40,79 +40,71 @@
// CHECKDSO: Relocations [
// CHECKDSO-NEXT: Section ({{.*}}) .rela.plt {
-// &(.got.plt[3]) = 0x30000 + 3 * 8 = 0x30018
-// CHECKDSO-NEXT: 0x30018 R_AARCH64_JUMP_SLOT foo
+// &(.got.plt[3]) = 0x30450 + 3 * 8 = 0x30468
+// CHECKDSO-NEXT: 0x30468 R_AARCH64_JUMP_SLOT foo
-// &(.got.plt[4]) = 0x30000 + 4 * 8 = 0x30020
-// CHECKDSO-NEXT: 0x30020 R_AARCH64_JUMP_SLOT bar
+// &(.got.plt[4]) = 0x30450 + 4 * 8 = 0x30470
+// CHECKDSO-NEXT: 0x30470 R_AARCH64_JUMP_SLOT bar
-// &(.got.plt[5]) = 0x30000 + 5 * 8 = 0x30028
-// CHECKDSO-NEXT: 0x30028 R_AARCH64_JUMP_SLOT weak
+// &(.got.plt[5]) = 0x30000 + 5 * 8 = 0x30470
+// CHECKDSO-NEXT: 0x30478 R_AARCH64_JUMP_SLOT weak
// CHECKDSO-NEXT: }
// CHECKDSO-NEXT: ]
// DUMPDSO: Contents of section .got.plt:
// .got.plt[0..2] = 0 (reserved)
// .got.plt[3..5] = .plt = 0x10010
-// DUMPDSO-NEXT: 30000 00000000 00000000 00000000 00000000 ................
-// DUMPDSO-NEXT: 30010 00000000 00000000 10000100 00000000 ................
-// DUMPDSO-NEXT: 30020 10000100 00000000 10000100 00000000 ................
+// DUMPDSO-NEXT: 30450 00000000 00000000 00000000 00000000
+// DUMPDSO-NEXT: 30460 00000000 00000000 40030100 00000000
+// DUMPDSO-NEXT: 30470 40030100 00000000 40030100 00000000
// DISASMDSO: _start:
-// 0x10030 - 0x10000 = 0x30 = 48
-// DISASMDSO-NEXT: 10000: 0c 00 00 14 b #48
-// 0x10040 - 0x10004 = 0x3c = 60
-// DISASMDSO-NEXT: 10004: 0f 00 00 14 b #60
-// 0x10050 - 0x10008 = 0x48 = 72
-// DISASMDSO-NEXT: 10008: 12 00 00 14 b #72
+// DISASMDSO-NEXT: 10330: b #0x30 <foo at plt>
+// DISASMDSO-NEXT: 10334: b #0x3c <bar at plt>
+// DISASMDSO-NEXT: 10338: b #0x48 <weak at plt>
// DISASMDSO: foo:
-// DISASMDSO-NEXT: 1000c: 1f 20 03 d5 nop
+// DISASMDSO-NEXT: 1033c: nop
// DISASMDSO: Disassembly of section .plt:
// DISASMDSO-EMPTY:
// DISASMDSO-NEXT: .plt:
-// DISASMDSO-NEXT: 10010: f0 7b bf a9 stp x16, x30, [sp, #-16]!
-// &(.got.plt[2]) = 0x3000 + 2 * 8 = 0x3010
-// Page(0x30010) - Page(0x10014) = 0x30000 - 0x10000 = 0x20000 = 131072
-// DISASMDSO-NEXT: 10014: 10 01 00 90 adrp x16, #131072
-// 0x3010 & 0xFFF = 0x10 = 16
-// DISASMDSO-NEXT: 10018: 11 0a 40 f9 ldr x17, [x16, #16]
-// DISASMDSO-NEXT: 1001c: 10 42 00 91 add x16, x16, #16
-// DISASMDSO-NEXT: 10020: 20 02 1f d6 br x17
-// DISASMDSO-NEXT: 10024: 1f 20 03 d5 nop
-// DISASMDSO-NEXT: 10028: 1f 20 03 d5 nop
-// DISASMDSO-NEXT: 1002c: 1f 20 03 d5 nop
+// DISASMDSO-NEXT: 10340: stp x16, x30, [sp, #-0x10]!
+// &(.got.plt[2]) = 0x30450 + 2 * 8 = 0x30460
+// DISASMDSO-NEXT: 10344: adrp x16, #0x20000
+// DISASMDSO-NEXT: 10348: ldr x17, [x16, #0x460]
+// DISASMDSO-NEXT: 1034c: add x16, x16, #0x460
+// DISASMDSO-NEXT: 10350: br x17
+// DISASMDSO-NEXT: 10354: nop
+// DISASMDSO-NEXT: 10358: nop
+// DISASMDSO-NEXT: 1035c: nop
-// foo at plt
-// Page(0x30018) - Page(0x10030) = 0x30000 - 0x10000 = 0x20000 = 131072
+// foo at plt 0x30468
+// &.got.plt[foo] = 0x30468
// DISASMDSO-EMPTY:
// DISASMDSO-NEXT: foo at plt:
-// DISASMDSO-NEXT: 10030: 10 01 00 90 adrp x16, #131072
-// 0x3018 & 0xFFF = 0x18 = 24
-// DISASMDSO-NEXT: 10034: 11 0e 40 f9 ldr x17, [x16, #24]
-// DISASMDSO-NEXT: 10038: 10 62 00 91 add x16, x16, #24
-// DISASMDSO-NEXT: 1003c: 20 02 1f d6 br x17
+// DISASMDSO-NEXT: 10360: adrp x16, #0x20000
+// DISASMDSO-NEXT: 10364: ldr x17, [x16, #0x468]
+// DISASMDSO-NEXT: 10368: add x16, x16, #0x468
+// DISASMDSO-NEXT: 1036c: br x17
// bar at plt
-// Page(0x30020) - Page(0x10040) = 0x30000 - 0x10000 = 0x20000 = 131072
+// &.got.plt[foo] = 0x30470
// DISASMDSO-EMPTY:
// DISASMDSO-NEXT: bar at plt:
-// DISASMDSO-NEXT: 10040: 10 01 00 90 adrp x16, #131072
-// 0x3020 & 0xFFF = 0x20 = 32
-// DISASMDSO-NEXT: 10044: 11 12 40 f9 ldr x17, [x16, #32]
-// DISASMDSO-NEXT: 10048: 10 82 00 91 add x16, x16, #32
-// DISASMDSO-NEXT: 1004c: 20 02 1f d6 br x17
+// DISASMDSO-NEXT: 10370: adrp x16, #0x20000
+// DISASMDSO-NEXT: 10374: ldr x17, [x16, #0x470]
+// DISASMDSO-NEXT: 10378: add x16, x16, #0x470
+// DISASMDSO-NEXT: 1037c: br x17
// weak at plt
-// Page(0x30028) - Page(0x10050) = 0x30000 - 0x10000 = 0x20000 = 131072
+// 0x30468 = 0x10000 + 131072 + 1128
// DISASMDSO-EMPTY:
// DISASMDSO-NEXT: weak at plt:
-// DISASMDSO-NEXT: 10050: 10 01 00 90 adrp x16, #131072
-// 0x3028 & 0xFFF = 0x28 = 40
-// DISASMDSO-NEXT: 10054: 11 16 40 f9 ldr x17, [x16, #40]
-// DISASMDSO-NEXT: 10058: 10 a2 00 91 add x16, x16, #40
-// DISASMDSO-NEXT: 1005c: 20 02 1f d6 br x17
+// DISASMDSO-NEXT: 10380: adrp x16, #0x20000
+// DISASMDSO-NEXT: 10384: ldr x17, [x16, #0x478]
+// DISASMDSO-NEXT: 10388: add x16, x16, #0x478
+// DISASMDSO-NEXT: 1038c: br x17
// CHECKEXE: Name: .plt
// CHECKEXE-NEXT: Type: SHT_PROGBITS
@@ -120,7 +112,7 @@
// CHECKEXE-NEXT: SHF_ALLOC
// CHECKEXE-NEXT: SHF_EXECINSTR
// CHECKEXE-NEXT: ]
-// CHECKEXE-NEXT: Address: 0x210010
+// CHECKEXE-NEXT: Address: 0x2102E0
// CHECKEXE-NEXT: Offset:
// CHECKEXE-NEXT: Size: 64
// CHECKEXE-NEXT: Link:
@@ -133,7 +125,7 @@
// CHECKEXE-NEXT: SHF_ALLOC
// CHECKEXE-NEXT: SHF_WRITE
// CHECKEXE-NEXT: ]
-// CHECKEXE-NEXT: Address: 0x230000
+// CHECKEXE-NEXT: Address: 0x2303F0
// CHECKEXE-NEXT: Offset:
// CHECKEXE-NEXT: Size: 40
// CHECKEXE-NEXT: Link:
@@ -143,64 +135,57 @@
// CHECKEXE: Relocations [
// CHECKEXE-NEXT: Section ({{.*}}) .rela.plt {
-// &(.got.plt[3]) = 0x230000 + 3 * 8 = 0x230018
-// CHECKEXE-NEXT: 0x230018 R_AARCH64_JUMP_SLOT bar 0x0
+// &(.got.plt[3]) = 0x2303f0 + 3 * 8 = 0x230408
+// CHECKEXE-NEXT: 0x230408 R_AARCH64_JUMP_SLOT bar 0x0
-// &(.got.plt[4]) = 0x230000 + 4 * 8 = 0x230020
-// CHECKEXE-NEXT: 0x230020 R_AARCH64_JUMP_SLOT weak 0x0
+// &(.got.plt[4]) = 0x2303f0 + 4 * 8 = 0x230410
+// CHECKEXE-NEXT: 0x230410 R_AARCH64_JUMP_SLOT weak 0x0
// CHECKEXE-NEXT: }
// CHECKEXE-NEXT: ]
// DUMPEXE: Contents of section .got.plt:
// .got.plt[0..2] = 0 (reserved)
// .got.plt[3..4] = .plt = 0x40010
-// DUMPEXE-NEXT: 230000 00000000 00000000 00000000 00000000
-// DUMPEXE-NEXT: 230010 00000000 00000000 10002100 00000000
-// DUMPEXE-NEXT: 230020 10002100 00000000
+// DUMPEXE-NEXT: 2303f0 00000000 00000000 00000000 00000000
+// DUMPEXE-NEXT: 230400 00000000 00000000 e0022100 00000000
+// DUMPEXE-NEXT: 230410 e0022100 00000000
// DISASMEXE: _start:
-// 0x21000c - 0x210000 = 0xc = 12
-// DISASMEXE-NEXT: 210000: 03 00 00 14 b #12
-// 0x210030 - 0x210004 = 0x2c = 44
-// DISASMEXE-NEXT: 210004: 0b 00 00 14 b #44
-// 0x210040 - 0x210008 = 0x38 = 56
-// DISASMEXE-NEXT: 210008: 0e 00 00 14 b #56
+// DISASMEXE-NEXT: 2102c8: b #0xc <foo>
+// DISASMEXE-NEXT: 2102cc: b #0x34 <bar at plt>
+// DISASMEXE-NEXT: 2102d0: b #0x40 <weak at plt>
// DISASMEXE: foo:
-// DISASMEXE-NEXT: 21000c: 1f 20 03 d5 nop
+// DISASMEXE-NEXT: 2102d4: nop
// DISASMEXE: Disassembly of section .plt:
// DISASMEXE-EMPTY:
// DISASMEXE-NEXT: .plt:
-// DISASMEXE-NEXT: 210010: f0 7b bf a9 stp x16, x30, [sp, #-16]!
-// &(.got.plt[2]) = 0x2200B0 + 2 * 8 = 0x2200C0
-// Page(0x230010) - Page(0x210014) = 0x230000 - 0x210000 = 0x20000 = 131072
-// DISASMEXE-NEXT: 210014: 10 01 00 90 adrp x16, #131072
-// 0x120c0 & 0xFFF = 0xC0 = 192
-// DISASMEXE-NEXT: 210018: 11 0a 40 f9 ldr x17, [x16, #16]
-// DISASMEXE-NEXT: 21001c: 10 42 00 91 add x16, x16, #16
-// DISASMEXE-NEXT: 210020: 20 02 1f d6 br x17
-// DISASMEXE-NEXT: 210024: 1f 20 03 d5 nop
-// DISASMEXE-NEXT: 210028: 1f 20 03 d5 nop
-// DISASMEXE-NEXT: 21002c: 1f 20 03 d5 nop
+// DISASMEXE-NEXT: 2102e0: stp x16, x30, [sp, #-0x10]!
+// &(.got.plt[2]) = 0x2303f0 + 2 * 8 = 0x230400
+// DISASMEXE-NEXT: 2102e4: adrp x16, #0x20000
+// DISASMEXE-NEXT: 2102e8: ldr x17, [x16, #0x400]
+// DISASMEXE-NEXT: 2102ec: add x16, x16, #0x400
+// DISASMEXE-NEXT: 2102f0: br x17
+// DISASMEXE-NEXT: 2102f4: nop
+// DISASMEXE-NEXT: 2102f8: nop
+// DISASMEXE-NEXT: 2102fc: nop
// bar at plt
-// Page(0x230018) - Page(0x210030) = 0x230000 - 0x210000 = 0x20000 = 131072
// DISASMEXE-EMPTY:
// DISASMEXE-NEXT: bar at plt:
-// DISASMEXE-NEXT: 210030: 10 01 00 90 adrp x16, #131072
-// DISASMEXE-NEXT: 210034: 11 0e 40 f9 ldr x17, [x16, #24]
-// DISASMEXE-NEXT: 210038: 10 62 00 91 add x16, x16, #24
-// DISASMEXE-NEXT: 21003c: 20 02 1f d6 br x17
+// DISASMEXE-NEXT: 210300: adrp x16, #0x20000
+// DISASMEXE-NEXT: 210304: ldr x17, [x16, #0x408]
+// DISASMEXE-NEXT: 210308: add x16, x16, #0x408
+// DISASMEXE-NEXT: 21030c: br x17
// weak at plt
-// Page(0x230020) - Page(0x210040) = 0x230000 - 0x210000 = 0x20000 = 131072
// DISASMEXE-EMPTY:
// DISASMEXE-NEXT: weak at plt:
-// DISASMEXE-NEXT: 210040: 10 01 00 90 adrp x16, #131072
-// DISASMEXE-NEXT: 210044: 11 12 40 f9 ldr x17, [x16, #32]
-// DISASMEXE-NEXT: 210048: 10 82 00 91 add x16, x16, #32
-// DISASMEXE-NEXT: 21004c: 20 02 1f d6 br x17
+// DISASMEXE-NEXT: 210310: adrp x16, #0x20000
+// DISASMEXE-NEXT: 210314: ldr x17, [x16, #0x410]
+// DISASMEXE-NEXT: 210318: add x16, x16, #0x410
+// DISASMEXE-NEXT: 21031c: br x17
.global _start,foo,bar
.weak weak
Modified: lld/trunk/test/ELF/pr34660.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/pr34660.s?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/pr34660.s (original)
+++ lld/trunk/test/ELF/pr34660.s Tue Aug 20 01:34:56 2019
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-none %s -o %t.o
# RUN: ld.lld --hash-style=sysv -shared %t.o -o %t
-# RUN: llvm-objdump %t -d | FileCheck %s --check-prefix=DISASM
+# RUN: llvm-objdump %t -d --no-show-raw-insn | FileCheck %s --check-prefix=DISASM
# RUN: llvm-readelf %t --symbols | FileCheck %s --check-prefix=SYM
# It would be much easier to understand/read this test if llvm-objdump would print
@@ -15,10 +15,10 @@
# DISASM: Disassembly of section .text:
# DISASM-EMPTY:
# DISASM-NEXT: $x.0:
-# DISASM-NEXT: 10000: 28 00 10 58 ldr x8, #131076
+# DISASM-NEXT: 1022c: ldr x8, #131176
# SYM: Symbol table '.symtab'
-# SYM: 0000000000030004 0 NOTYPE LOCAL DEFAULT 6 patatino
+# SYM: 0000000000030294 0 NOTYPE LOCAL DEFAULT 6 patatino
ldr x8, patatino
.data
Modified: lld/trunk/test/ELF/relocation-b-aarch64.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-b-aarch64.test?rev=369344&r1=369343&r2=369344&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-b-aarch64.test (original)
+++ lld/trunk/test/ELF/relocation-b-aarch64.test Tue Aug 20 01:34:56 2019
@@ -2,7 +2,7 @@
# RUN: yaml2obj %s -o %t.o
# RUN: ld.lld %t.o -o %t.out
-# RUN: llvm-objdump -d -triple=aarch64-none-linux %t.out | FileCheck %s
+# RUN: llvm-objdump -d --no-show-raw-insn %t.out | FileCheck %s
# Check that the R_AARCH64_JUMP26 writes the branch opcode as well as the
# immediate. We use this property to overwrite instructions with a branch.
@@ -10,9 +10,9 @@
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# CHECK-NEXT: foo:
-# CHECK-NEXT: 210000: 01 00 00 14 b #4
+# CHECK-NEXT: 210120: b #4
# CHECK: bar:
-# CHECK-NEXT: 210004: ff ff ff 17 b #-4
+# CHECK-NEXT: 210124: b #-4
!ELF
FileHeader:
More information about the llvm-commits
mailing list