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]

pr4716 fix


A relocatable file doesn't necessarily have relocations.

	PR 4716
	* objcopy.c (filter_symbols): Correct relocatable file test.

Index: binutils/objcopy.c
===================================================================
RCS file: /cvs/src/src/binutils/objcopy.c,v
retrieving revision 1.115
diff -u -p -r1.115 objcopy.c
--- binutils/objcopy.c	29 Jun 2007 00:34:14 -0000	1.115
+++ binutils/objcopy.c	2 Jul 2007 08:02:05 -0000
@@ -910,8 +910,7 @@ filter_symbols (bfd *abfd, bfd *obfd, as
 {
   asymbol **from = isyms, **to = osyms;
   long src_count = 0, dst_count = 0;
-  int relocatable = (abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC))
-		    == HAS_RELOC;
+  int relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
 
   for (; src_count < symcount; src_count++)
     {

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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