aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-06-05 14:06:52 +0000
committerAlan Modra <amodra@gmail.com>2002-06-05 14:06:52 +0000
commitdc156bc0bb8b5c3c18dd9add22360d601a767cc3 (patch)
tree7862374063dca326d36616213a6059a4199b0b55 /binutils/objcopy.c
parent * elf.c (group_signature): Swap in the whole symbol, and handle (diff)
downloadbinutils-gdb-dc156bc0bb8b5c3c18dd9add22360d601a767cc3.tar.gz
binutils-gdb-dc156bc0bb8b5c3c18dd9add22360d601a767cc3.tar.bz2
binutils-gdb-dc156bc0bb8b5c3c18dd9add22360d601a767cc3.zip
* objcopy.c (copy_section): Don't copy SEC_GROUP sections.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r--binutils/objcopy.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index da197f3d8c2..241a2c66630 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1684,13 +1684,15 @@ copy_section (ibfd, isection, obfdarg)
sec_ptr osection;
bfd_size_type size;
long relsize;
+ flagword flags;
/* If we have already failed earlier on,
do not keep on generating complaints now. */
if (status != 0)
return;
- if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0
+ flags = bfd_get_section_flags (ibfd, isection);
+ if ((flags & SEC_DEBUGGING) != 0
&& (strip_symbols == STRIP_DEBUG
|| strip_symbols == STRIP_UNNEEDED
|| strip_symbols == STRIP_ALL
@@ -1698,6 +1700,9 @@ copy_section (ibfd, isection, obfdarg)
|| convert_debugging))
return;
+ if ((flags & SEC_GROUP) != 0)
+ return;
+
p = find_section_list (bfd_section_name (ibfd, isection), false);
if (sections_removed && p != NULL && p->remove)