* objcopy.c (setup_section): Preserve SEC_RELOC when
authorMike Stump <mrs@apple.com>
Thu, 29 Nov 2001 00:51:58 +0000 (00:51 +0000)
committerMike Stump <mrs@apple.com>
Thu, 29 Nov 2001 00:51:58 +0000 (00:51 +0000)
--set-section-flags is used.

binutils/ChangeLog
binutils/objcopy.c

index 1eb553e..2066770 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-28  Mike Stump  <mrs@wrs.com>
+
+       * objcopy.c (setup_section): Preserve SEC_RELOC when
+       --set-section-flags is used.
+
 2001-11-19  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * readelf.c (do_debug_str): New variable.
index 03ec035..b42fbe9 100644 (file)
@@ -1595,7 +1595,7 @@ setup_section (ibfd, isection, obfdarg)
     }
 
   if (p != NULL && p->set_flags)
-    flags = p->flags | (flags & SEC_HAS_CONTENTS);
+    flags = p->flags | (flags & (SEC_HAS_CONTENTS | SEC_RELOC));
   if (!bfd_set_section_flags (obfd, osection, flags))
     {
       err = _("flags");