diff options
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 9138371..c4be65a 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -5028,43 +5028,11 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, this reloc. */ if (sreloc == NULL) { - const char *name; - bfd *dynobj; - - name = (bfd_elf_string_from_elf_section - (abfd, - elf_elfheader (abfd)->e_shstrndx, - elf_section_data (sec)->rel_hdr.sh_name)); - if (name == NULL) - return FALSE; - - if (! CONST_STRNEQ (name, ".rela") - || strcmp (bfd_get_section_name (abfd, sec), - name + 5) != 0) - { - (*_bfd_error_handler) - (_("%B: bad relocation section name `%s\'"), - abfd, name); - bfd_set_error (bfd_error_bad_value); - } + sreloc = _bfd_elf_make_dynamic_reloc_section + (sec, htab->elf.dynobj, 3, abfd, /*rela?*/ TRUE); - dynobj = htab->elf.dynobj; - sreloc = bfd_get_section_by_name (dynobj, name); if (sreloc == NULL) - { - flagword flags; - - flags = (SEC_HAS_CONTENTS | SEC_READONLY - | SEC_IN_MEMORY | SEC_LINKER_CREATED - | SEC_ALLOC | SEC_LOAD); - sreloc = bfd_make_section_with_flags (dynobj, - name, - flags); - if (sreloc == NULL - || ! bfd_set_section_alignment (dynobj, sreloc, 3)) - return FALSE; - } - elf_section_data (sec)->sreloc = sreloc; + return FALSE; } /* If this is a global symbol, we count the number of |