mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-09 23:32:21 +08:00
tic6x: Call _bfd_elf_add_dynamic_tags
Update tic6x linker tests to expect C6000_DSBT_BASE, C6000_DSBT_SIZE and C6000_DSBT_INDEX dynamic tags immediately before NULL dynamic tag. bfd/ * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags. ld/ * testsuite/ld-tic6x/shlib-1.rd: Move C6000_DSBT_BASE, C6000_DSBT_SIZE and C6000_DSBT_INDEX dynamic tags to the last. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2020-06-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call
|
||||
_bfd_elf_add_dynamic_tags.
|
||||
|
||||
2020-06-29 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* peXXigen.c (_bfd_XXi_slurp_codeview_record): Properly check
|
||||
|
@ -3352,11 +3352,8 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
||||
#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 (!_bfd_elf_add_dynamic_tags (output_bfd, info, relocs))
|
||||
return FALSE;
|
||||
|
||||
if (!add_dynamic_entry (DT_C6000_DSBT_BASE, 0)
|
||||
|| !add_dynamic_entry (DT_C6000_DSBT_SIZE, htab->params.dsbt_size)
|
||||
@ -3364,34 +3361,6 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
||||
htab->params.dsbt_index))
|
||||
return FALSE;
|
||||
|
||||
if (htab->elf.splt->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 (relocs)
|
||||
{
|
||||
if (!add_dynamic_entry (DT_RELA, 0)
|
||||
|| !add_dynamic_entry (DT_RELASZ, 0)
|
||||
|| !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
|
||||
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) != 0)
|
||||
{
|
||||
if (!add_dynamic_entry (DT_TEXTREL, 0))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef add_dynamic_entry
|
||||
|
||||
|
Reference in New Issue
Block a user