aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-02-17 20:42:22 +0000
committerIan Lance Taylor <ian@airs.com>1995-02-17 20:42:22 +0000
commit842eba6688d36ea2752e66de0958df3e7af2c004 (patch)
tree652b050f1057676dc6f4d61300a0376800646a5e /binutils
parentaa396c6858aa2dece8536892fa0474b11d34ecd4 (diff)
downloadgdb-842eba6688d36ea2752e66de0958df3e7af2c004.zip
gdb-842eba6688d36ea2752e66de0958df3e7af2c004.tar.gz
gdb-842eba6688d36ea2752e66de0958df3e7af2c004.tar.bz2
--set-section-flags patch from dje.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/objcopy.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 7596154..86232ad 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1029,10 +1029,9 @@ setup_section (ibfd, isection, obfdarg)
goto loser;
}
+ flags = bfd_get_section_flags (ibfd, isection);
if (p != NULL && p->set_flags)
- flags = p->flags;
- else
- flags = bfd_get_section_flags (ibfd, isection);
+ flags = p->flags | (flags & SEC_HAS_CONTENTS);
if (!bfd_set_section_flags (obfd, osection, flags))
{
err = "flags";