[lld] r268145 - Don't depend on lld creating relocations in ro segments.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 17:49:11 PDT 2016
Author: rafael
Date: Fri Apr 29 19:49:10 2016
New Revision: 268145
URL: http://llvm.org/viewvc/llvm-project?rev=268145&view=rev
Log:
Don't depend on lld creating relocations in ro segments.
We currently don't do a good job of diagnosing inputs that would require
dynamic relocations to be applied to read only segments.
I am about to improve lld in that area, but unfortunately we developed
tests that depend on the current behavior.
To make clear what is actually changing, this first patch just updates
tests to not depend on the current behavior. In most cases this just
means using a rw section instead of a ro one, but that unfortunately
changes many addresses.
Modified:
lld/trunk/test/ELF/Inputs/visibility.s
lld/trunk/test/ELF/as-needed.s
lld/trunk/test/ELF/incompatible.s
lld/trunk/test/ELF/lto/Inputs/shared.s
lld/trunk/test/ELF/lto/undefined-puts.ll
lld/trunk/test/ELF/protected-shared.s
lld/trunk/test/ELF/relative-dynamic-reloc-ppc64.s
lld/trunk/test/ELF/relative-dynamic-reloc.s
lld/trunk/test/ELF/relocation-non-alloc.s
lld/trunk/test/ELF/relocation-size-shared.s
lld/trunk/test/ELF/relocation-size.s
lld/trunk/test/ELF/shared-be.s
lld/trunk/test/ELF/tls-i686.s
lld/trunk/test/ELF/verneed.s
lld/trunk/test/ELF/visibility.s
Modified: lld/trunk/test/ELF/Inputs/visibility.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/visibility.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/Inputs/visibility.s (original)
+++ lld/trunk/test/ELF/Inputs/visibility.s Fri Apr 29 19:49:10 2016
@@ -1,3 +1,4 @@
+.data
.quad default
.protected protected
Modified: lld/trunk/test/ELF/as-needed.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/as-needed.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/as-needed.s (original)
+++ lld/trunk/test/ELF/as-needed.s Fri Apr 29 19:49:10 2016
@@ -38,6 +38,7 @@
.global _start
_start:
+.data
.long bar
.long zed
.weak baz
Modified: lld/trunk/test/ELF/incompatible.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/incompatible.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/incompatible.s (original)
+++ lld/trunk/test/ELF/incompatible.s Fri Apr 29 19:49:10 2016
@@ -53,6 +53,7 @@
// ARCHIVE: a.o is incompatible with {{.*}}b.o
.global _start
_start:
+.data
.long foo
// REQUIRES: x86,aarch64
Modified: lld/trunk/test/ELF/lto/Inputs/shared.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/Inputs/shared.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/Inputs/shared.s (original)
+++ lld/trunk/test/ELF/lto/Inputs/shared.s Fri Apr 29 19:49:10 2016
@@ -1,5 +1,7 @@
.globl printf
+.type printf, @function
printf:
.globl puts
+.type puts, @function
puts:
Modified: lld/trunk/test/ELF/lto/undefined-puts.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/undefined-puts.ll?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/undefined-puts.ll (original)
+++ lld/trunk/test/ELF/lto/undefined-puts.ll Fri Apr 29 19:49:10 2016
@@ -20,7 +20,7 @@ declare i32 @printf(i8*, ...)
; Check that puts symbol is present in the dynamic symbol table and
; there's a relocation for it.
; CHECK: Dynamic Relocations {
-; CHECK-NEXT: 0x11007 R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC
+; CHECK-NEXT: 0x13018 R_X86_64_JUMP_SLOT puts 0x0
; CHECK-NEXT: }
; CHECK: DynamicSymbols [
Modified: lld/trunk/test/ELF/protected-shared.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/protected-shared.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/protected-shared.s (original)
+++ lld/trunk/test/ELF/protected-shared.s Fri Apr 29 19:49:10 2016
@@ -7,11 +7,13 @@
.global _start
_start:
- .quad foo
.global bar
bar:
+ .data
+ .quad foo
+
// CHECK: Name: bar
// CHECK-NEXT: Value:
// CHECK-NEXT: Size: 0
Modified: lld/trunk/test/ELF/relative-dynamic-reloc-ppc64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relative-dynamic-reloc-ppc64.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/relative-dynamic-reloc-ppc64.s (original)
+++ lld/trunk/test/ELF/relative-dynamic-reloc-ppc64.s Fri Apr 29 19:49:10 2016
@@ -13,7 +13,7 @@
// CHECK-NEXT: 0x10010 R_PPC64_RELATIVE - 0x10009
// CHECK-NEXT: 0x{{.*}} R_PPC64_RELATIVE - 0x[[ZED_ADDR:.*]]
// CHECK-NEXT: 0x{{.*}} R_PPC64_RELATIVE - 0x[[FOO_ADDR]]
-// CHECK-NEXT: 0x1D0 R_PPC64_ADDR64 external 0x0
+// CHECK-NEXT: 0x30008 R_PPC64_ADDR64 external 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
@@ -60,7 +60,7 @@ bar:
.comm zed,1
.quad zed
- .section abc,"a"
+ .section abc,"aw"
.quad foo
.quad external
Modified: lld/trunk/test/ELF/relative-dynamic-reloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relative-dynamic-reloc.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/relative-dynamic-reloc.s (original)
+++ lld/trunk/test/ELF/relative-dynamic-reloc.s Fri Apr 29 19:49:10 2016
@@ -12,7 +12,7 @@
// CHECK-NEXT: 0x1010 R_X86_64_RELATIVE - 0x1009
// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x[[ZED_ADDR:.*]]
// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x[[FOO_ADDR]]
-// CHECK-NEXT: 0x1D0 R_X86_64_64 external 0x0
+// CHECK-NEXT: 0x3008 R_X86_64_64 external 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
@@ -59,7 +59,7 @@ bar:
.comm zed,1
.quad zed
- .section abc,"a"
+ .section abc,"aw"
.quad foo
.quad external
Modified: lld/trunk/test/ELF/relocation-non-alloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-non-alloc.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-non-alloc.s (original)
+++ lld/trunk/test/ELF/relocation-non-alloc.s Fri Apr 29 19:49:10 2016
@@ -4,21 +4,21 @@
// RUN: ld.lld %t -o %t2 -shared
// RUN: llvm-readobj -s -section-data -r %t2 | FileCheck %s
-// CHECK: Name: .text
+// CHECK: Name: .data
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
-// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: SHF_WRITE
// CHECK-NEXT: ]
-// CHECK-NEXT: Address: 0x1000
-// CHECK-NEXT: Offset: 0x1000
+// CHECK-NEXT: Address: 0x2000
+// CHECK-NEXT: Offset: 0x2000
// CHECK-NEXT: Size: 16
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
-// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
-// CHECK-NEXT: 0000: 00100000 00000000 00000000 00000000
+// CHECK-NEXT: 0000: 00200000 00000000 00000000 00000000
// CHECK-NEXT: )
// CHECK: Name: foo
@@ -33,17 +33,18 @@
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
-// CHECK-NEXT: 0000: 00100000 00000000 00100000 00000000
-// CHECK-NEXT: 0010: 00100000 00000000 00100000 00000000
+// CHECK-NEXT: 0000: 00200000 00000000 00200000 00000000
+// CHECK-NEXT: 0010: 00200000 00000000 00200000 00000000
// CHECK-NEXT: )
// CHECK: Relocations [
// CHECK-NEXT: Section ({{.}}) .rela.dyn {
-// CHECK-NEXT: 0x1000 R_X86_64_RELATIVE - 0x1000
-// CHECK-NEXT: 0x1008 R_X86_64_64 zed 0x0
+// CHECK-NEXT: 0x2000 R_X86_64_RELATIVE - 0x2000
+// CHECK-NEXT: 0x2008 R_X86_64_64 zed 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
+.data
.global zed
zed:
bar:
Modified: lld/trunk/test/ELF/relocation-size-shared.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-size-shared.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-size-shared.s (original)
+++ lld/trunk/test/ELF/relocation-size-shared.s Fri Apr 29 19:49:10 2016
@@ -7,48 +7,48 @@
// RELOCSHARED: Relocations [
// RELOCSHARED-NEXT: Section ({{.*}}) .rela.dyn {
-// RELOCSHARED-NEXT: 0x11018 R_X86_64_SIZE64 fooshared 0xFFFFFFFFFFFFFFFF
-// RELOCSHARED-NEXT: 0x11020 R_X86_64_SIZE64 fooshared 0x0
-// RELOCSHARED-NEXT: 0x11028 R_X86_64_SIZE64 fooshared 0x1
-// RELOCSHARED-NEXT: 0x11048 R_X86_64_SIZE32 fooshared 0xFFFFFFFFFFFFFFFF
-// RELOCSHARED-NEXT: 0x1104F R_X86_64_SIZE32 fooshared 0x0
-// RELOCSHARED-NEXT: 0x11056 R_X86_64_SIZE32 fooshared 0x1
+// RELOCSHARED-NEXT: 0x13018 R_X86_64_SIZE64 fooshared 0xFFFFFFFFFFFFFFFF
+// RELOCSHARED-NEXT: 0x13020 R_X86_64_SIZE64 fooshared 0x0
+// RELOCSHARED-NEXT: 0x13028 R_X86_64_SIZE64 fooshared 0x1
+// RELOCSHARED-NEXT: 0x13048 R_X86_64_SIZE32 fooshared 0xFFFFFFFFFFFFFFFF
+// RELOCSHARED-NEXT: 0x1304F R_X86_64_SIZE32 fooshared 0x0
+// RELOCSHARED-NEXT: 0x13056 R_X86_64_SIZE32 fooshared 0x1
// RELOCSHARED-NEXT: }
// RELOCSHARED-NEXT:]
-// DISASM: Disassembly of section .text:
+// DISASM: Disassembly of section test
// DISASM: _data:
-// DISASM-NEXT: 11000: 19 00
-// DISASM-NEXT: 11002: 00 00
-// DISASM-NEXT: 11004: 00 00
-// DISASM-NEXT: 11006: 00 00
-// DISASM-NEXT: 11008: 1a 00
-// DISASM-NEXT: 1100a: 00 00
-// DISASM-NEXT: 1100c: 00 00
-// DISASM-NEXT: 1100e: 00 00
-// DISASM-NEXT: 11010: 1b 00
-// DISASM-NEXT: 11012: 00 00
-// DISASM-NEXT: 11014: 00 00
-// DISASM-NEXT: 11016: 00 00
-// DISASM-NEXT: 11018: 00 00
-// DISASM-NEXT: 1101a: 00 00
-// DISASM-NEXT: 1101c: 00 00
-// DISASM-NEXT: 1101e: 00 00
-// DISASM-NEXT: 11020: 00 00
-// DISASM-NEXT: 11022: 00 00
-// DISASM-NEXT: 11024: 00 00
-// DISASM-NEXT: 11026: 00 00
-// DISASM-NEXT: 11028: 00 00
-// DISASM-NEXT: 1102a: 00 00
-// DISASM-NEXT: 1102c: 00 00
-// DISASM-NEXT: 1102e: 00 00
+// DISASM-NEXT: 13000: 19 00
+// DISASM-NEXT: 13002: 00 00
+// DISASM-NEXT: 13004: 00 00
+// DISASM-NEXT: 13006: 00 00
+// DISASM-NEXT: 13008: 1a 00
+// DISASM-NEXT: 1300a: 00 00
+// DISASM-NEXT: 1300c: 00 00
+// DISASM-NEXT: 1300e: 00 00
+// DISASM-NEXT: 13010: 1b 00
+// DISASM-NEXT: 13012: 00 00
+// DISASM-NEXT: 13014: 00 00
+// DISASM-NEXT: 13016: 00 00
+// DISASM-NEXT: 13018: 00 00
+// DISASM-NEXT: 1301a: 00 00
+// DISASM-NEXT: 1301c: 00 00
+// DISASM-NEXT: 1301e: 00 00
+// DISASM-NEXT: 13020: 00 00
+// DISASM-NEXT: 13022: 00 00
+// DISASM-NEXT: 13024: 00 00
+// DISASM-NEXT: 13026: 00 00
+// DISASM-NEXT: 13028: 00 00
+// DISASM-NEXT: 1302a: 00 00
+// DISASM-NEXT: 1302c: 00 00
+// DISASM-NEXT: 1302e: 00 00
// DISASM: _start:
-// DISASM-NEXT: 11030: 8b 04 25 19 00 00 00 movl 25, %eax
-// DISASM-NEXT: 11037: 8b 04 25 1a 00 00 00 movl 26, %eax
-// DISASM-NEXT: 1103e: 8b 04 25 1b 00 00 00 movl 27, %eax
-// DISASM-NEXT: 11045: 8b 04 25 00 00 00 00 movl 0, %eax
-// DISASM-NEXT: 1104c: 8b 04 25 00 00 00 00 movl 0, %eax
-// DISASM-NEXT: 11053: 8b 04 25 00 00 00 00 movl 0, %eax
+// DISASM-NEXT: 13030: 8b 04 25 19 00 00 00 movl 25, %eax
+// DISASM-NEXT: 13037: 8b 04 25 1a 00 00 00 movl 26, %eax
+// DISASM-NEXT: 1303e: 8b 04 25 1b 00 00 00 movl 27, %eax
+// DISASM-NEXT: 13045: 8b 04 25 00 00 00 00 movl 0, %eax
+// DISASM-NEXT: 1304c: 8b 04 25 00 00 00 00 movl 0, %eax
+// DISASM-NEXT: 13053: 8b 04 25 00 00 00 00 movl 0, %eax
.data
.global foo
@@ -57,7 +57,7 @@
foo:
.zero 26
-.text
+.section test, "awx"
_data:
// R_X86_64_SIZE64:
.quad foo at SIZE-1
Modified: lld/trunk/test/ELF/relocation-size.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-size.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-size.s (original)
+++ lld/trunk/test/ELF/relocation-size.s Fri Apr 29 19:49:10 2016
@@ -9,84 +9,84 @@
// NORELOC: Relocations [
// NORELOC-NEXT: ]
-// DISASM: Disassembly of section .text:
+// DISASM: Disassembly of section test:
// DISASM-NEXT: _data:
-// DISASM-NEXT: 11000: 19 00
-// DISASM-NEXT: 11002: 00 00
-// DISASM-NEXT: 11004: 00 00
-// DISASM-NEXT: 11006: 00 00
-// DISASM-NEXT: 11008: 1a 00
-// DISASM-NEXT: 1100a: 00 00
-// DISASM-NEXT: 1100c: 00 00
-// DISASM-NEXT: 1100e: 00 00
-// DISASM-NEXT: 11010: 1b 00
-// DISASM-NEXT: 11012: 00 00
-// DISASM-NEXT: 11014: 00 00
-// DISASM-NEXT: 11016: 00 00
-// DISASM-NEXT: 11018: 19 00
-// DISASM-NEXT: 1101a: 00 00
-// DISASM-NEXT: 1101c: 00 00
-// DISASM-NEXT: 1101e: 00 00
-// DISASM-NEXT: 11020: 1a 00
-// DISASM-NEXT: 11022: 00 00
-// DISASM-NEXT: 11024: 00 00
-// DISASM-NEXT: 11026: 00 00
-// DISASM-NEXT: 11028: 1b 00
-// DISASM-NEXT: 1102a: 00 00
-// DISASM-NEXT: 1102c: 00 00
-// DISASM-NEXT: 1102e: 00 00
+// DISASM-NEXT: 12000: 19 00
+// DISASM-NEXT: 12002: 00 00
+// DISASM-NEXT: 12004: 00 00
+// DISASM-NEXT: 12006: 00 00
+// DISASM-NEXT: 12008: 1a 00
+// DISASM-NEXT: 1200a: 00 00
+// DISASM-NEXT: 1200c: 00 00
+// DISASM-NEXT: 1200e: 00 00
+// DISASM-NEXT: 12010: 1b 00
+// DISASM-NEXT: 12012: 00 00
+// DISASM-NEXT: 12014: 00 00
+// DISASM-NEXT: 12016: 00 00
+// DISASM-NEXT: 12018: 19 00
+// DISASM-NEXT: 1201a: 00 00
+// DISASM-NEXT: 1201c: 00 00
+// DISASM-NEXT: 1201e: 00 00
+// DISASM-NEXT: 12020: 1a 00
+// DISASM-NEXT: 12022: 00 00
+// DISASM-NEXT: 12024: 00 00
+// DISASM-NEXT: 12026: 00 00
+// DISASM-NEXT: 12028: 1b 00
+// DISASM-NEXT: 1202a: 00 00
+// DISASM-NEXT: 1202c: 00 00
+// DISASM-NEXT: 1202e: 00 00
// DISASM: _start:
-// DISASM-NEXT: 11030: 8b 04 25 19 00 00 00 movl 25, %eax
-// DISASM-NEXT: 11037: 8b 04 25 1a 00 00 00 movl 26, %eax
-// DISASM-NEXT: 1103e: 8b 04 25 1b 00 00 00 movl 27, %eax
-// DISASM-NEXT: 11045: 8b 04 25 19 00 00 00 movl 25, %eax
-// DISASM-NEXT: 1104c: 8b 04 25 1a 00 00 00 movl 26, %eax
-// DISASM-NEXT: 11053: 8b 04 25 1b 00 00 00 movl 27, %eax
+// DISASM-NEXT: 12030: 8b 04 25 19 00 00 00 movl 25, %eax
+// DISASM-NEXT: 12037: 8b 04 25 1a 00 00 00 movl 26, %eax
+// DISASM-NEXT: 1203e: 8b 04 25 1b 00 00 00 movl 27, %eax
+// DISASM-NEXT: 12045: 8b 04 25 19 00 00 00 movl 25, %eax
+// DISASM-NEXT: 1204c: 8b 04 25 1a 00 00 00 movl 26, %eax
+// DISASM-NEXT: 12053: 8b 04 25 1b 00 00 00 movl 27, %eax
// RELOCSHARED: Relocations [
// RELOCSHARED-NEXT: Section ({{.*}}) .rela.dyn {
-// RELOCSHARED-NEXT: 0x1000 R_X86_64_SIZE64 foo 0xFFFFFFFFFFFFFFFF
-// RELOCSHARED-NEXT: 0x1008 R_X86_64_SIZE64 foo 0x0
-// RELOCSHARED-NEXT: 0x1010 R_X86_64_SIZE64 foo 0x1
-// RELOCSHARED-NEXT: 0x1033 R_X86_64_SIZE32 foo 0xFFFFFFFFFFFFFFFF
-// RELOCSHARED-NEXT: 0x103A R_X86_64_SIZE32 foo 0x0
-// RELOCSHARED-NEXT: 0x1041 R_X86_64_SIZE32 foo 0x1
+// RELOCSHARED-NEXT: 0x3000 R_X86_64_SIZE64 foo 0xFFFFFFFFFFFFFFFF
+// RELOCSHARED-NEXT: 0x3008 R_X86_64_SIZE64 foo 0x0
+// RELOCSHARED-NEXT: 0x3010 R_X86_64_SIZE64 foo 0x1
+// RELOCSHARED-NEXT: 0x3033 R_X86_64_SIZE32 foo 0xFFFFFFFFFFFFFFFF
+// RELOCSHARED-NEXT: 0x303A R_X86_64_SIZE32 foo 0x0
+// RELOCSHARED-NEXT: 0x3041 R_X86_64_SIZE32 foo 0x1
// RELOCSHARED-NEXT: }
// RELOCSHARED-NEXT: ]
-// DISASMSHARED: Disassembly of section .text:
+// DISASMSHARED: Disassembly of section test:
// DISASMSHARED-NEXT: _data:
-// DISASMSHARED-NEXT: 1000: 00 00
-// DISASMSHARED-NEXT: 1002: 00 00
-// DISASMSHARED-NEXT: 1004: 00 00
-// DISASMSHARED-NEXT: 1006: 00 00
-// DISASMSHARED-NEXT: 1008: 00 00
-// DISASMSHARED-NEXT: 100a: 00 00
-// DISASMSHARED-NEXT: 100c: 00 00
-// DISASMSHARED-NEXT: 100e: 00 00
-// DISASMSHARED-NEXT: 1010: 00 00
-// DISASMSHARED-NEXT: 1012: 00 00
-// DISASMSHARED-NEXT: 1014: 00 00
-// DISASMSHARED-NEXT: 1016: 00 00
-// DISASMSHARED-NEXT: 1018: 19 00
-// DISASMSHARED-NEXT: 101a: 00 00
-// DISASMSHARED-NEXT: 101c: 00 00
-// DISASMSHARED-NEXT: 101e: 00 00
-// DISASMSHARED-NEXT: 1020: 1a 00
-// DISASMSHARED-NEXT: 1022: 00 00
-// DISASMSHARED-NEXT: 1024: 00 00
-// DISASMSHARED-NEXT: 1026: 00 00
-// DISASMSHARED-NEXT: 1028: 1b 00
-// DISASMSHARED-NEXT: 102a: 00 00
-// DISASMSHARED-NEXT: 102c: 00 00
-// DISASMSHARED-NEXT: 102e: 00 00
+// DISASMSHARED-NEXT: 3000: 00 00
+// DISASMSHARED-NEXT: 3002: 00 00
+// DISASMSHARED-NEXT: 3004: 00 00
+// DISASMSHARED-NEXT: 3006: 00 00
+// DISASMSHARED-NEXT: 3008: 00 00
+// DISASMSHARED-NEXT: 300a: 00 00
+// DISASMSHARED-NEXT: 300c: 00 00
+// DISASMSHARED-NEXT: 300e: 00 00
+// DISASMSHARED-NEXT: 3010: 00 00
+// DISASMSHARED-NEXT: 3012: 00 00
+// DISASMSHARED-NEXT: 3014: 00 00
+// DISASMSHARED-NEXT: 3016: 00 00
+// DISASMSHARED-NEXT: 3018: 19 00
+// DISASMSHARED-NEXT: 301a: 00 00
+// DISASMSHARED-NEXT: 301c: 00 00
+// DISASMSHARED-NEXT: 301e: 00 00
+// DISASMSHARED-NEXT: 3020: 1a 00
+// DISASMSHARED-NEXT: 3022: 00 00
+// DISASMSHARED-NEXT: 3024: 00 00
+// DISASMSHARED-NEXT: 3026: 00 00
+// DISASMSHARED-NEXT: 3028: 1b 00
+// DISASMSHARED-NEXT: 302a: 00 00
+// DISASMSHARED-NEXT: 302c: 00 00
+// DISASMSHARED-NEXT: 302e: 00 00
// DISASMSHARED: _start:
-// DISASMSHARED-NEXT: 1030: 8b 04 25 00 00 00 00 movl 0, %eax
-// DISASMSHARED-NEXT: 1037: 8b 04 25 00 00 00 00 movl 0, %eax
-// DISASMSHARED-NEXT: 103e: 8b 04 25 00 00 00 00 movl 0, %eax
-// DISASMSHARED-NEXT: 1045: 8b 04 25 19 00 00 00 movl 25, %eax
-// DISASMSHARED-NEXT: 104c: 8b 04 25 1a 00 00 00 movl 26, %eax
-// DISASMSHARED-NEXT: 1053: 8b 04 25 1b 00 00 00 movl 27, %eax
+// DISASMSHARED-NEXT: 3030: 8b 04 25 00 00 00 00 movl 0, %eax
+// DISASMSHARED-NEXT: 3037: 8b 04 25 00 00 00 00 movl 0, %eax
+// DISASMSHARED-NEXT: 303e: 8b 04 25 00 00 00 00 movl 0, %eax
+// DISASMSHARED-NEXT: 3045: 8b 04 25 19 00 00 00 movl 25, %eax
+// DISASMSHARED-NEXT: 304c: 8b 04 25 1a 00 00 00 movl 26, %eax
+// DISASMSHARED-NEXT: 3053: 8b 04 25 1b 00 00 00 movl 27, %eax
.data
.global foo
@@ -103,7 +103,7 @@ foo:
foohidden:
.zero 26
-.text
+.section test,"axw"
_data:
// R_X86_64_SIZE64:
.quad foo at SIZE-1
Modified: lld/trunk/test/ELF/shared-be.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/shared-be.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/shared-be.s (original)
+++ lld/trunk/test/ELF/shared-be.s Fri Apr 29 19:49:10 2016
@@ -31,6 +31,7 @@
.global _start
_start:
+.data
.long bar
.long zed
Modified: lld/trunk/test/ELF/tls-i686.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/tls-i686.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/tls-i686.s (original)
+++ lld/trunk/test/ELF/tls-i686.s Fri Apr 29 19:49:10 2016
@@ -15,7 +15,7 @@ var:
var1:
.long 1
-.text
+.section test, "awx"
.global _start
_start:
movl $var at tpoff, %edx
@@ -30,40 +30,40 @@ _start:
movl %gs:0, %ecx
leal var1 at ntpoff(%ecx), %eax
-// DIS: Disassembly of section .text:
+// DIS: Disassembly of section test:
// DIS-NEXT: _start:
-// DIS-NEXT: 11000: ba 08 00 00 00 movl $8, %edx
-// DIS-NEXT: 11005: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
-// DIS-NEXT: 1100c: 29 d0 subl %edx, %eax
-// DIS-NEXT: 1100e: ba 04 00 00 00 movl $4, %edx
-// DIS-NEXT: 11013: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
-// DIS-NEXT: 1101a: 29 d0 subl %edx, %eax
-// DIS-NEXT: 1101c: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
-// DIS-NEXT: 11023: 8d 81 f8 ff ff ff leal -8(%ecx), %eax
-// DIS-NEXT: 11029: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
-// DIS-NEXT: 11030: 8d 81 fc ff ff ff leal -4(%ecx), %eax
+// DIS-NEXT: 12000: ba 08 00 00 00 movl $8, %edx
+// DIS-NEXT: 12005: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
+// DIS-NEXT: 1200c: 29 d0 subl %edx, %eax
+// DIS-NEXT: 1200e: ba 04 00 00 00 movl $4, %edx
+// DIS-NEXT: 12013: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
+// DIS-NEXT: 1201a: 29 d0 subl %edx, %eax
+// DIS-NEXT: 1201c: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
+// DIS-NEXT: 12023: 8d 81 f8 ff ff ff leal -8(%ecx), %eax
+// DIS-NEXT: 12029: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
+// DIS-NEXT: 12030: 8d 81 fc ff ff ff leal -4(%ecx), %eax
// RELOC: Relocations [
// RELOC-NEXT: ]
-// DISSHARED: Disassembly of section .text:
+// DISSHARED: Disassembly of section test:
// DISSHARED-NEXT: _start:
-// DISSHARED-NEXT: 1000: ba 00 00 00 00 movl $0, %edx
-// DISSHARED-NEXT: 1005: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
-// DISSHARED-NEXT: 100c: 29 d0 subl %edx, %eax
-// DISSHARED-NEXT: 100e: ba 00 00 00 00 movl $0, %edx
-// DISSHARED-NEXT: 1013: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
-// DISSHARED-NEXT: 101a: 29 d0 subl %edx, %eax
-// DISSHARED-NEXT: 101c: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
-// DISSHARED-NEXT: 1023: 8d 81 00 00 00 00 leal (%ecx), %eax
-// DISSHARED-NEXT: 1029: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
-// DISSHARED-NEXT: 1030: 8d 81 00 00 00 00 leal (%ecx), %eax
+// DISSHARED-NEXT: 2000: ba 00 00 00 00 movl $0, %edx
+// DISSHARED-NEXT: 2005: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
+// DISSHARED-NEXT: 200c: 29 d0 subl %edx, %eax
+// DISSHARED-NEXT: 200e: ba 00 00 00 00 movl $0, %edx
+// DISSHARED-NEXT: 2013: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
+// DISSHARED-NEXT: 201a: 29 d0 subl %edx, %eax
+// DISSHARED-NEXT: 201c: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
+// DISSHARED-NEXT: 2023: 8d 81 00 00 00 00 leal (%ecx), %eax
+// DISSHARED-NEXT: 2029: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx
+// DISSHARED-NEXT: 2030: 8d 81 00 00 00 00 leal (%ecx), %eax
// RELOCSHARED: Relocations [
// RELOCSHARED-NEXT: Section (4) .rel.dyn {
-// RELOCSHARED-NEXT: 0x1001 R_386_TLS_TPOFF32 var 0x0
-// RELOCSHARED-NEXT: 0x100F R_386_TLS_TPOFF32 var1 0x0
-// RELOCSHARED-NEXT: 0x1025 R_386_TLS_TPOFF var 0x0
-// RELOCSHARED-NEXT: 0x1032 R_386_TLS_TPOFF var1 0x0
+// RELOCSHARED-NEXT: 0x2001 R_386_TLS_TPOFF32 var 0x0
+// RELOCSHARED-NEXT: 0x200F R_386_TLS_TPOFF32 var1 0x0
+// RELOCSHARED-NEXT: 0x2025 R_386_TLS_TPOFF var 0x0
+// RELOCSHARED-NEXT: 0x2032 R_386_TLS_TPOFF var1 0x0
// RELOCSHARED-NEXT: }
// RELOCSHARED-NEXT: ]
Modified: lld/trunk/test/ELF/verneed.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/verneed.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/verneed.s (original)
+++ lld/trunk/test/ELF/verneed.s Fri Apr 29 19:49:10 2016
@@ -99,6 +99,6 @@
.globl _start
_start:
-call f1
-call f2
-call g1
+call f1 at plt
+call f2 at plt
+call g1 at plt
Modified: lld/trunk/test/ELF/visibility.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/visibility.s?rev=268145&r1=268144&r2=268145&view=diff
==============================================================================
--- lld/trunk/test/ELF/visibility.s (original)
+++ lld/trunk/test/ELF/visibility.s Fri Apr 29 19:49:10 2016
@@ -49,7 +49,7 @@
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: _DYNAMIC
-// CHECK-NEXT: Value: 0x2000
+// CHECK-NEXT: Value:
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
More information about the llvm-commits
mailing list