aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/ppc64elf.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/ppc64elf.em')
-rw-r--r--ld/emultempl/ppc64elf.em8
1 files changed, 3 insertions, 5 deletions
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
index 51623b1..9a49fa5 100644
--- a/ld/emultempl/ppc64elf.em
+++ b/ld/emultempl/ppc64elf.em
@@ -221,13 +221,11 @@ ppc_add_stub_section (const char *stub_sec_name, asection *input_section)
lang_output_section_statement_type *os;
struct hook_stub_info info;
- stub_sec = bfd_make_section_anyway (stub_file->the_bfd, stub_sec_name);
- if (stub_sec == NULL)
- goto err_ret;
-
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_KEEP);
- if (!bfd_set_section_flags (stub_file->the_bfd, stub_sec, flags))
+ stub_sec = bfd_make_section_anyway_with_flags (stub_file->the_bfd,
+ stub_sec_name, flags);
+ if (stub_sec == NULL)
goto err_ret;
output_section = input_section->output_section;