From cdb306b2ba22ba63acd79fa459b632dac1a2aaa6 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Thu, 10 Feb 2022 12:05:47 +0000 Subject: [PATCH] c4643efe7b # DP: Fix objcopy --only-keep-debug, taken from the trunk (7c4643efe7b) # DP: Fix objcopy --only-keep-debug, taken from the trunk (7c4643efe7b) Gbp-Pq: Name 7c4643efe7b.diff --- binutils/objcopy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binutils/objcopy.c b/binutils/objcopy.c index d16d8ee67..d53aa5c60 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -4085,9 +4085,6 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg) goto loser; } - if (make_nobits) - elf_section_type (osection) = SHT_NOBITS; - size = bfd_section_size (isection); size = bfd_convert_section_size (ibfd, isection, obfd, size); if (copy_byte >= 0) @@ -4181,6 +4178,9 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg) goto loser; } + if (make_nobits) + elf_section_type (osection) = SHT_NOBITS; + /* All went well. */ return; -- 2.30.2