This is the mail archive of the binutils@sources.redhat.com 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]

[RFA:] Trivial test for .gnu.warning.SYMBOL


I noticed the lack of even trivial test-cases for ".gnu.warning".
Here's one for .gnu.warning.SYMBOL.
Ok to commit?

ld/testsuite:
	* ld-elf/start.s, ld-elf/symbolref.s, ld-elf/symbol1w.s,
	ld-elf/warn1.d: New test.

--- /dev/null	Tue Oct 29 15:57:07 2002
+++ start.s	Sat Feb  5 03:12:33 2005
@@ -0,0 +1,4 @@
+	.text
+	.global _start
+_start:
+	.long 0
--- /dev/null	Tue Oct 29 15:57:07 2002
+++ symbol1ref.s	Sat Feb  5 03:12:49 2005
@@ -0,0 +1,3 @@
+	.text
+	.long symbol1
+
--- /dev/null	Tue Oct 29 15:57:07 2002
+++ symbol1w.s	Sat Feb  5 03:32:12 2005
@@ -0,0 +1,6 @@
+	.section .gnu.warning.symbol1
+	.asciz "witty one-liner"
+	.text
+	.global symbol1
+symbol1:
+	.long 0
--- /dev/null	Tue Oct 29 15:57:07 2002
+++ warn1.d	Sat Feb  5 05:06:00 2005
@@ -0,0 +1,13 @@
+#source: start.s
+#source: symbol1ref.s
+#source: symbol1w.s
+#ld: 
+#warning: ^[^\\n]*\): warning: witty one-liner$
+#readelf: -s
+
+# Check that warnings are generated for the .gnu.warning.SYMBOL
+# construct and that the symbol still appears as expected.
+
+#...
+[ 	]+[0-9]+:[ 	]+[0-9]+[ 	]+0[ 	]+NOTYPE[ 	]+GLOBAL DEFAULT[ 	]+[1-9] symbol1
+#pass

brgds, H-P


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