diff options
Diffstat (limited to 'bfd/elf64-alpha.c')
-rw-r--r-- | bfd/elf64-alpha.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 0b31d45..a6b2098 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -2910,38 +2910,14 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, #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 (relplt) - { - 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 (elf64_alpha_use_secureplt - && !add_dynamic_entry (DT_ALPHA_PLTRO, 1)) - return FALSE; - } - - if (relocs) - { - if (!add_dynamic_entry (DT_RELA, 0) - || !add_dynamic_entry (DT_RELASZ, 0) - || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela))) - return FALSE; + if (!_bfd_elf_add_dynamic_tags (output_bfd, info, + relocs || relplt)) + return FALSE; - if (info->flags & DF_TEXTREL) - { - if (!add_dynamic_entry (DT_TEXTREL, 0)) - return FALSE; - } - } + if (relplt + && elf64_alpha_use_secureplt + && !add_dynamic_entry (DT_ALPHA_PLTRO, 1)) + return FALSE; } #undef add_dynamic_entry |