summaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2010-02-01 09:59:45 +0000
committerNathan Sidwell <nathan@codesourcery.com>2010-02-01 09:59:45 +0000
commit6a63594fc1c4f9a258036344957c60718af5a5d5 (patch)
tree5cd537d8f3c29a2326e9f8e5e5cc25f28eeea321 /binutils/objcopy.c
parent557a706986c535f4e91b42a781bea101c7253986 (diff)
downloadbinutils-redhat-6a63594fc1c4f9a258036344957c60718af5a5d5.tar.gz
* 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 5df1449dbf..a9b0d3717d 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,