summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/pr21904.d
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-08-04 05:39:56 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-04 05:39:56 -0700
commit9f06dab1e3acfb675669348a3ff331580d4eaf1e (patch)
treec7e6c67816304b3d50f7e9373caeb6900ebc2ca3 /ld/testsuite/ld-elf/pr21904.d
parent223b97ba9d9d1aa61bf22058f637c779c7621e6f (diff)
downloadbinutils-gdb-9f06dab1e3acfb675669348a3ff331580d4eaf1e.tar.gz
Add a testcase for "ld -d"
"ld -d" assigns space to common symbols even if a relocatable output file is specified (with '-r'). PR ld/21904 * testsuite/ld-elf/pr21904.d: New file. * testsuite/ld-elf/pr21904.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elf/pr21904.d')
-rw-r--r--ld/testsuite/ld-elf/pr21904.d6
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr21904.d b/ld/testsuite/ld-elf/pr21904.d
new file mode 100644
index 00000000000..1d464fc7c4b
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr21904.d
@@ -0,0 +1,6 @@
+#ld: -d -r
+#readelf: -s
+
+#...
+.*: [0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ foo
+#pass