From dc156bc0bb8b5c3c18dd9add22360d601a767cc3 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 5 Jun 2002 14:06:52 +0000 Subject: [PATCH] * objcopy.c (copy_section): Don't copy SEC_GROUP sections. --- binutils/ChangeLog | 6 +++++- binutils/objcopy.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 7f8ab70fa78..72b9f1b99fd 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,4 +1,8 @@ -2002-06-3 Elias Athanasopoulos +2002-06-05 Alan Modra + + * objcopy.c (copy_section): Don't copy SEC_GROUP sections. + +2002-06-03 Elias Athanasopoulos * objdump.c: Fix formatting. 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) -- 2.30.2