summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/ld
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
index 9372f88..3ba2ba6 100644
--- a/contrib/binutils/ld/emultempl/ppc64elf.em
+++ b/contrib/binutils/ld/emultempl/ppc64elf.em
@@ -72,6 +72,7 @@ ppc_create_output_section_statements (void)
{
extern const bfd_target bfd_elf64_powerpc_vec;
extern const bfd_target bfd_elf64_powerpcle_vec;
+ asection *sect;
if (link_info.hash->creator != &bfd_elf64_powerpc_vec
&& link_info.hash->creator != &bfd_elf64_powerpcle_vec)
@@ -92,6 +93,8 @@ ppc_create_output_section_statements (void)
return;
}
+ if (bfd_get_section_by_name (stub_file->the_bfd, ".note.GNU-stack") == NULL)
+ sect = bfd_make_section (stub_file->the_bfd, ".note.GNU-stack");
stub_file->the_bfd->flags |= BFD_LINKER_CREATED;
ldlang_add_file (stub_file);
ppc64_elf_init_stub_bfd (stub_file->the_bfd, &link_info);
OpenPOWER on IntegriCloud