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

PATCH: PR binutils/10492: strip -g breaks objects with STB_GNU_UNIQUE


Hi,

I am checking in this testcase for

http://sourceware.org/bugzilla/show_bug.cgi?id=10492

Tested on Linux/ia32, Linux/Intel64, Linux/ia64 as well as cross
Linux/mips.

H.J.
---
Index: binutils-all/unique.s
===================================================================
--- binutils-all/unique.s	(revision 0)
+++ binutils-all/unique.s	(revision 0)
@@ -0,0 +1,4 @@
+	.data
+	.type foo,%gnu_unique_object
+foo:
+	.byte 0
Index: binutils-all/objcopy.exp
===================================================================
--- binutils-all/objcopy.exp	(revision 6517)
+++ binutils-all/objcopy.exp	(working copy)
@@ -851,6 +851,7 @@ if [is_elf_format] {
     run_dump_test "strip-7"
     run_dump_test "strip-8"
     run_dump_test "strip-9"
+    run_dump_test "strip-10"
 
     if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } {
 	# Check to make sure we don't strip a symbol named in relocations.
Index: binutils-all/strip-10.d
===================================================================
--- binutils-all/strip-10.d	(revision 0)
+++ binutils-all/strip-10.d	(revision 0)
@@ -0,0 +1,8 @@
+#PROG: strip
+#source: unique.s
+#strip: -g
+#readelf: -s
+#name: strip on STB_GNU_UNIQUE
+
+#...
+[ 	]+[0-9]+:[ 	]+[0-9a-f]+[ 	]+[0-9]+[ 	]+OBJECT[	 ]+UNIQUE DEFAULT[ 	]+[1-9] foo
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 6517)
+++ ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2009-08-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/10492
+	* binutils-all/objcopy.exp: Run strip-10.
+
+	* binutils-all/strip-10.d: New.
+	* binutils-all/unique.s: Likewise.
+
 2009-07-31  Daniel Gutson  <dgutson@codesourcery.com>
 	    Daniel Jacobowitz  <dan@codesourcery.com>
 


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