aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2006-11-06 10:39:17 +0000
committerVladimir Prus <vladimir@codesourcery.com>2006-11-06 10:39:17 +0000
commitbc251d509b711b2db0a1aa269c432d23be019f84 (patch)
tree06fe8b2bf5a956b0448c797a148d2ea1a665ed2a /ld/testsuite/ld-elf
parenta9353e608e5924c4208fae93e139d8f23b49f996 (diff)
downloadgdb-bc251d509b711b2db0a1aa269c432d23be019f84.zip
gdb-bc251d509b711b2db0a1aa269c432d23be019f84.tar.gz
gdb-bc251d509b711b2db0a1aa269c432d23be019f84.tar.bz2
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Don't prepend "warning" to the message. * testsuite/ld-elf/warn2.d: New. * testsuite/ld-elf/symbol2w.s: New. * testsuite/ld-elf/symbol2ref.s: New.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/symbol2ref.s3
-rw-r--r--ld/testsuite/ld-elf/symbol2w.s6
-rw-r--r--ld/testsuite/ld-elf/warn2.d15
3 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/symbol2ref.s b/ld/testsuite/ld-elf/symbol2ref.s
new file mode 100644
index 0000000..d2710f9
--- /dev/null
+++ b/ld/testsuite/ld-elf/symbol2ref.s
@@ -0,0 +1,3 @@
+ .text
+ .dc.a Foo
+
diff --git a/ld/testsuite/ld-elf/symbol2w.s b/ld/testsuite/ld-elf/symbol2w.s
new file mode 100644
index 0000000..2452b2b
--- /dev/null
+++ b/ld/testsuite/ld-elf/symbol2w.s
@@ -0,0 +1,6 @@
+ .section .gnu.warning,"a",@progbits
+ .global Foo
+ .type Foo, @object
+ .size Foo, 20
+Foo:
+ .string "function 'Foo' used"
diff --git a/ld/testsuite/ld-elf/warn2.d b/ld/testsuite/ld-elf/warn2.d
new file mode 100644
index 0000000..864db83
--- /dev/null
+++ b/ld/testsuite/ld-elf/warn2.d
@@ -0,0 +1,15 @@
+#source: start.s
+#source: symbol2ref.s
+#source: symbol2w.s
+#ld: -T group.ld
+#warning: ^[^\\n]*\.[obj]+: warning: function 'Foo' used$
+#readelf: -s
+#notarget: "sparc64-*-solaris2*" "sparcv9-*-solaris2*"
+#xfail: "arc-*-*" "d30v-*-*" "dlx-*-*" "i960-*-*" "or32-*-*" "pj-*-*"
+
+# Check that warnings are generated for the symbols in .gnu.warning
+# construct and that the symbol still appears as expected.
+
+#...
+[ ]+[0-9]+:[ ]+[0-9a-f]+[ ]+20[ ]+OBJECT[ ]+GLOBAL DEFAULT[ ]+1 Foo
+#pass