aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfxx-sparc.c')
-rw-r--r--bfd/elfxx-sparc.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 4dcdd17..bd046ac 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -2590,39 +2590,10 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
#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,
- SPARC_ELF_RELA_BYTES (htab)))
+ if (!_bfd_elf_maybe_vxworks_add_dynamic_tags (output_bfd, info,
+ TRUE))
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;
- }
-
if (ABI_64_P (output_bfd))
{
int reg;
@@ -2678,9 +2649,6 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
eht->dynsymcount++;
}
}
- if (htab->elf.target_os == is_vxworks
- && !elf_vxworks_add_dynamic_entries (output_bfd, info))
- return FALSE;
}
#undef add_dynamic_entry