X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-tilepro.c;h=5b3e80a5fc9865ef86a5502ca655884b589c535c;hb=5b872f7df76cc88e0c4fdfe7872a3df3178302dc;hp=2d78f3c9c89c1ef0c0e372af28d40156f2608cab;hpb=d49e5065ed43ec88627fd8cc6ab9e45fcc0e538a;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c index 2d78f3c9c8..5b3e80a5fc 100644 --- a/bfd/elf32-tilepro.c +++ b/bfd/elf32-tilepro.c @@ -2381,51 +2381,7 @@ tilepro_elf_size_dynamic_sections (bfd *output_bfd, return FALSE; } - if (elf_hash_table (info)->dynamic_sections_created) - { - /* Add some entries to the .dynamic section. We fill in the - values later, in tilepro_elf_finish_dynamic_sections, but we - must add the entries now so that we get the correct size for - the .dynamic section. The DT_DEBUG entry is filled in by the - dynamic linker and used by the debugger. */ -#define add_dynamic_entry(TAG, VAL) \ - _bfd_elf_add_dynamic_entry (info, TAG, VAL) - - if (bfd_link_executable (info)) - { - if (!add_dynamic_entry (DT_DEBUG, 0)) - return FALSE; - } - - if (htab->elf.srelplt->size != 0) - { - if (!add_dynamic_entry (DT_PLTGOT, 0) - || !add_dynamic_entry (DT_PLTRELSZ, 0) - || !add_dynamic_entry (DT_PLTREL, DT_RELA) - || !add_dynamic_entry (DT_JMPREL, 0)) - return FALSE; - } - - if (!add_dynamic_entry (DT_RELA, 0) - || !add_dynamic_entry (DT_RELASZ, 0) - || !add_dynamic_entry (DT_RELAENT, TILEPRO_ELF_RELA_BYTES)) - return FALSE; - - /* If any dynamic relocs apply to a read-only section, - then we need a DT_TEXTREL entry. */ - if ((info->flags & DF_TEXTREL) == 0) - elf_link_hash_traverse (&htab->elf, - _bfd_elf_maybe_set_textrel, info); - - if (info->flags & DF_TEXTREL) - { - if (!add_dynamic_entry (DT_TEXTREL, 0)) - return FALSE; - } - } -#undef add_dynamic_entry - - return TRUE; + return _bfd_elf_add_dynamic_tags (output_bfd, info, TRUE); } /* Return the base VMA address which should be subtracted from real addresses