This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_26-branch] Add a testcase for PR ld/18591


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=48953bf4f8b2f9e257903efbc89cb927b43f5317

commit 48953bf4f8b2f9e257903efbc89cb927b43f5317
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Feb 2 06:36:52 2016 -0800

    Add a testcase for PR ld/18591
    
    Backport from master
    
    	PR ld/18591
    	* testsuite/ld-x86-64/pr18591.d: New file.
    	* testsuite/ld-x86-64/pr18591.s: Likewise.
    	* testsuite/ld-x86-64/x86-64.exp: Run pr18591.

Diff:
---
 ld/ChangeLog                      | 10 ++++++++++
 ld/testsuite/ld-x86-64/pr18591.d  | 12 ++++++++++++
 ld/testsuite/ld-x86-64/pr18591.s  |  8 ++++++++
 ld/testsuite/ld-x86-64/x86-64.exp |  1 +
 4 files changed, 31 insertions(+)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 8479e51..e7c5038 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,13 @@
+2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Backport from master
+	2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/18591
+	* testsuite/ld-x86-64/pr18591.d: New file.
+	* testsuite/ld-x86-64/pr18591.s: Likewise.
+	* testsuite/ld-x86-64/x86-64.exp: Run pr18591.
+
 2016-01-29  H.J. Lu  <hongjiu.lu@intel.com>
 
 	Backport from master
diff --git a/ld/testsuite/ld-x86-64/pr18591.d b/ld/testsuite/ld-x86-64/pr18591.d
new file mode 100644
index 0000000..9f60622
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr18591.d
@@ -0,0 +1,12 @@
+#as: --64
+#ld: -melf_x86_64 -shared -z max-page-size=0x200000
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+[a-f0-9]+ <bar>:
+[ 	]*[a-f0-9]+:	48 8b 05 ([0-9a-f]{2} ){4}	mov    0x[a-f0-9]+\(%rip\),%rax        # [a-f0-9]+ <_DYNAMIC\+0x[a-f0-9]+>
+#pass
diff --git a/ld/testsuite/ld-x86-64/pr18591.s b/ld/testsuite/ld-x86-64/pr18591.s
new file mode 100644
index 0000000..d726f08
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr18591.s
@@ -0,0 +1,8 @@
+	.hidden foo
+	.comm pad,0x80000000,8
+	.comm foo,8,8
+	.text
+	.globl	bar
+	.type	bar, @function
+bar:
+	movq	foo@GOTPCREL(%rip), %rax
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 45b7f09..97d746a 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -353,6 +353,7 @@ run_dump_test "pr19013-x32"
 run_dump_test "pr19013-nacl"
 run_dump_test "pr19162"
 run_dump_test "pr19175"
+run_dump_test "pr18591"
 
 # Add $PLT_CFLAGS if PLT is expected.
 global PLT_CFLAGS


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]