mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
On PowerPC64, linker emits a fake object into each linked object,
'linker stubs'. Add .note.GNU-stack for the stubs objects. Without this, final binary will have RWE mode for PT_GNU_STACK regardless of the actual requirements. Tested by: nwhitehorn Reviewed by: dim, nwhitehorn
This commit is contained in:
parent
f1a143ca96
commit
434efabd4c
1 changed files with 3 additions and 0 deletions
|
|
@ -60,6 +60,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)
|
||||
|
|
@ -80,6 +81,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");
|
||||
ldlang_add_file (stub_file);
|
||||
ppc64_elf_init_stub_bfd (stub_file->the_bfd, &link_info);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue