aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-09-20 11:46:32 +0100
committerNick Clifton <nickc@redhat.com>2022-09-20 11:46:32 +0100
commit1588d98babe46881783a40d70d8b8baa91c156b8 (patch)
tree0462399080995a8ac73f39374f86a9581750ad5e /binutils/objcopy.c
parent7e19db932c4e7b2a3878b7d24610eeb1b39b34e5 (diff)
downloadbinutils-1588d98babe46881783a40d70d8b8baa91c156b8.zip
binutils-1588d98babe46881783a40d70d8b8baa91c156b8.tar.gz
binutils-1588d98babe46881783a40d70d8b8baa91c156b8.tar.bz2
Stop strip from complaining about empty note sections when stripping a binary for a second time.
* objcopy.c (copy_object): Do not issue a warning message when encountering empty .gnu.build.attribute sections.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r--binutils/objcopy.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 75992e8..4326175 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -2968,11 +2968,9 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
bfd_size_type size = bfd_section_size (osec);
if (size == 0)
- {
- bfd_nonfatal_message (NULL, ibfd, osec,
- _("warning: note section is empty"));
- continue;
- }
+ /* This can happen, eg when stripping a binary for a second
+ time. See BZ 2121365 for an example. */
+ continue;
merged_note_section * merged = xmalloc (sizeof * merged);
merged->contents = NULL;