This is the mail archive of the 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 objcopy]: Don't strip .reloc section by default for pe-coff


this patch adjusts that by default objcopy doesn't strip .reloc
sections, if user specifies strip-all, as "reloc" section has special
meaning for pe-coff.

Tested for x86_&4-w64-mingw32, i686-pc-cygwin, and i686-w64-mingw32.
Ok for apply?


ChangeLog binutils

2012-10-05  Kai Tietz

	* objcopy.c (is_strip_section_1): Don't strip
	.reloc section by default.

Index: binutils/objcopy.c
RCS file: /cvs/src/src/binutils/objcopy.c,v
retrieving revision 1.157
diff -u -p -r1.157 objcopy.c
--- binutils/objcopy.c	8 May 2012 17:49:36 -0000	1.157
+++ binutils/objcopy.c	1 Oct 2012 14:54:27 -0000
@@ -977,7 +977,10 @@ is_strip_section_1 (bfd *abfd ATTRIBUTE_
 	  || strip_symbols == STRIP_ALL
 	  || discard_locals == LOCALS_ALL
 	  || convert_debugging)
-	return TRUE;
+	{
+	  if (strcmp (bfd_get_section_name (abfd, sec), ".reloc") != 0)
+	    return TRUE;
+	}

       if (strip_symbols == STRIP_DWO)
 	return is_dwo_section (abfd, sec);

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