public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add ld-x86-64/pic1 test
@ 2016-04-20 18:14 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2016-04-20 18:14 UTC (permalink / raw)
  To: binutils

	* testsuite/ld-x86-64/pic1.d: New file.
	* testsuite/ld-x86-64/pic1.s: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Run pic1.
---
 ld/ChangeLog                      | 6 ++++++
 ld/testsuite/ld-x86-64/pic1.d     | 3 +++
 ld/testsuite/ld-x86-64/pic1.s     | 2 ++
 ld/testsuite/ld-x86-64/x86-64.exp | 1 +
 4 files changed, 12 insertions(+)
 create mode 100644 ld/testsuite/ld-x86-64/pic1.d
 create mode 100644 ld/testsuite/ld-x86-64/pic1.s

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0ce4e2d..74be8d4 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,11 @@
 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* testsuite/ld-x86-64/pic1.d: New file.
+	* testsuite/ld-x86-64/pic1.s: Likewise.
+	* testsuite/ld-x86-64/x86-64.exp: Run pic1.
+
+2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* testsuite/ld-x86-64/pie2.d: New file.
 	* testsuite/ld-x86-64/pie2.s: Likewise.
 	* testsuite/ld-x86-64/x86-64.exp: Run pie2.
diff --git a/ld/testsuite/ld-x86-64/pic1.d b/ld/testsuite/ld-x86-64/pic1.d
new file mode 100644
index 0000000..9e4b957
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pic1.d
@@ -0,0 +1,3 @@
+#as: --64
+#ld: -shared -melf_x86_64
+#error: .*relocation R_X86_64_32 against undefined symbol `foo' can not be used when making a shared object; recompile with -fPIC
diff --git a/ld/testsuite/ld-x86-64/pic1.s b/ld/testsuite/ld-x86-64/pic1.s
new file mode 100644
index 0000000..0adb503
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pic1.s
@@ -0,0 +1,2 @@
+	.data
+	.long foo
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index b923fba..b48f3c7 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -250,6 +250,7 @@ run_dump_test "pr14207"
 run_dump_test "gotplt1"
 run_dump_test "pie1"
 run_dump_test "pie2"
+run_dump_test "pic1"
 run_dump_test "largecomm-1a"
 run_dump_test "largecomm-1b"
 run_dump_test "largecomm-1c"
-- 
2.5.5

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-20 18:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 18:14 [PATCH] Add ld-x86-64/pic1 test H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).