aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2010-02-01 09:59:46 +0000
committerNathan Sidwell <nathan@codesourcery.com>2010-02-01 09:59:46 +0000
commit0930eddd65bd8f1e41f8eaec99f9d9bef22553cd (patch)
treefca2a61ef118993d6ad081e8d69b17352a9e9cb7 /binutils/objcopy.c
parent89b402421ca1e6dfb04850205d5f2708a23ff6c3 (diff)
downloadgdb-0930eddd65bd8f1e41f8eaec99f9d9bef22553cd.zip
gdb-0930eddd65bd8f1e41f8eaec99f9d9bef22553cd.tar.gz
gdb-0930eddd65bd8f1e41f8eaec99f9d9bef22553cd.tar.bz2
* objcopy.c (copy_object): Set SEC_LINKER_CREATED when adding
sections. testsuite/ * binutils-all/note-1.d: New. * binutils-all/objcopy.exp: Add it.
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 5df1449..a9b0d37 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1608,7 +1608,12 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
}
else
{
- padd->section = bfd_make_section_with_flags (obfd, padd->name, flags);
+ /* We use LINKER_CREATED here so that the backend hooks
+ will create any special section type information,
+ instead of presuming we know what we're doing merely
+ because we set the flags. */
+ padd->section = bfd_make_section_with_flags
+ (obfd, padd->name, flags | SEC_LINKER_CREATED);
if (padd->section == NULL)
{
bfd_nonfatal_message (NULL, obfd, NULL,