aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog12
-rw-r--r--ld/testsuite/ld-i386/i386.exp1
-rw-r--r--ld/testsuite/ld-i386/pr19175.d13
-rw-r--r--ld/testsuite/ld-i386/pr19175.s5
-rw-r--r--ld/testsuite/ld-i386/pr19175.t11
-rw-r--r--ld/testsuite/ld-x86-64/pr19175.d13
-rw-r--r--ld/testsuite/ld-x86-64/pr19175.s5
-rw-r--r--ld/testsuite/ld-x86-64/pr19175.t11
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp1
9 files changed, 72 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 42558ba..7946644 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,17 @@
2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
+ PR ld/19175
+ * ld-i386/i386.exp: Run pr19175.
+ * ld-x86-64/x86-64.exp: Likewise.
+ * ld-i386/pr19175.d: New file.
+ * ld-i386/pr19175.s: Likewise.
+ * ld-i386/pr19175.t: Likewise.
+ * ld-x86-64/pr19175.d: Likewise.
+ * ld-x86-64/pr19175.s: Likewise.
+ * ld-x86-64/pr19175.t: Likewise.
+
+2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
+
PR ld/19171
* ld-i386/lea1.s: Add tests for address load of __start_XXX
and __stop_XXX.
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 9bf08da..84a63e8 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -315,6 +315,7 @@ run_dump_test "load4b"
run_dump_test "load5a"
run_dump_test "load5b"
run_dump_test "load6"
+run_dump_test "pr19175"
if { !([istarget "i?86-*-linux*"]
|| [istarget "i?86-*-gnu*"]
diff --git a/ld/testsuite/ld-i386/pr19175.d b/ld/testsuite/ld-i386/pr19175.d
new file mode 100644
index 0000000..3f2edb1
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr19175.d
@@ -0,0 +1,13 @@
+#source: pr19175.s
+#as: --32
+#ld: -Bsymbolic -shared -melf_i386 -T pr19175.t
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+#...
+[ ]*[a-f0-9]+: 8d 81 ([0-9a-f]{2} ){4} * lea -0x[a-f0-9]+\(%ecx\),%eax
+#pass
diff --git a/ld/testsuite/ld-i386/pr19175.s b/ld/testsuite/ld-i386/pr19175.s
new file mode 100644
index 0000000..dc846a9
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr19175.s
@@ -0,0 +1,5 @@
+ .globl _start
+ .type _start, @function
+_start:
+ movl _text@GOT(%ecx), %eax
+ .size _start, .-_start
diff --git a/ld/testsuite/ld-i386/pr19175.t b/ld/testsuite/ld-i386/pr19175.t
new file mode 100644
index 0000000..1018e9e
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr19175.t
@@ -0,0 +1,11 @@
+EXTERN(_start)
+ENTRY(_start)
+
+SECTIONS
+{
+ .text :
+ {
+ _text = .;
+ *(.text*)
+ }
+}
diff --git a/ld/testsuite/ld-x86-64/pr19175.d b/ld/testsuite/ld-x86-64/pr19175.d
new file mode 100644
index 0000000..70e5689
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr19175.d
@@ -0,0 +1,13 @@
+#source: pr19175.s
+#as: --64
+#ld: -Bsymbolic -shared -melf_x86_64 -T pr19175.t
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+#...
+[ ]*[a-f0-9]+: 48 8d 05 ([0-9a-f]{2} ){4} * lea -0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <_start>
+#pass
diff --git a/ld/testsuite/ld-x86-64/pr19175.s b/ld/testsuite/ld-x86-64/pr19175.s
new file mode 100644
index 0000000..2548e07
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr19175.s
@@ -0,0 +1,5 @@
+ .globl _start
+ .type _start, @function
+_start:
+ movq _text@GOTPCREL(%rip), %rax
+ .size _start, .-_start
diff --git a/ld/testsuite/ld-x86-64/pr19175.t b/ld/testsuite/ld-x86-64/pr19175.t
new file mode 100644
index 0000000..1018e9e
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr19175.t
@@ -0,0 +1,11 @@
+EXTERN(_start)
+ENTRY(_start)
+
+SECTIONS
+{
+ .text :
+ {
+ _text = .;
+ *(.text*)
+ }
+}
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 6caea5f..869cbe5 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -347,6 +347,7 @@ run_dump_test "pr18815"
run_dump_test "pr19013"
run_dump_test "pr19013-x32"
run_dump_test "pr19013-nacl"
+run_dump_test "pr19175"
# Add $PLT_CFLAGS if PLT is expected.
global PLT_CFLAGS