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]

--set-section-flags


When --set-section-flags is used, and a section has relocation
information, the relocs are stripped, this seems counter to what the
user probably wanted to do.  This change preserves the relocation
information, if there was some.

What do you think?

2001-11-28  mike stump  <mrs@kankakee.wrs.com>

	* objcopy.c (setup_section): Preserve SEC_RELOC when
          --set-section-flags is used.

Doing diffs in objcopy.c.~1~:
*** objcopy.c.~1~	Wed Nov 28 14:52:37 2001
--- objcopy.c	Wed Nov 28 14:53:14 2001
*************** setup_section (ibfd, isection, obfdarg)
*** 1677,1683 ****
  
    flags = bfd_get_section_flags (ibfd, isection);
    if (p != NULL && p->set_flags)
!     flags = p->flags | (flags & SEC_HAS_CONTENTS);
    if (!bfd_set_section_flags (obfd, osection, flags))
      {
        err = _("flags");
--- 1677,1683 ----
  
    flags = bfd_get_section_flags (ibfd, isection);
    if (p != NULL && p->set_flags)
!     flags = p->flags | (flags & (SEC_HAS_CONTENTS | SEC_RELOC));
    if (!bfd_set_section_flags (obfd, osection, flags))
      {
        err = _("flags");
--------------


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