mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 23:39:35 +08:00
ia64: Set DF_TEXTREL instead of reltext
Update ia64 ELF backend to set DF_TEXTREL for dynamic relocs against readonly sections like other backends. * elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext. (allocate_dynrel_entries): Set DF_TEXTREL instead of reltext. (elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead of reltext.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext.
|
||||||
|
(allocate_dynrel_entries): Set DF_TEXTREL instead of reltext.
|
||||||
|
(elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead
|
||||||
|
of reltext.
|
||||||
|
|
||||||
2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
|
2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR ld/26094
|
PR ld/26094
|
||||||
|
@ -143,7 +143,6 @@ struct elfNN_ia64_link_hash_table
|
|||||||
asection *rel_pltoff_sec; /* Dynamic relocation section for same. */
|
asection *rel_pltoff_sec; /* Dynamic relocation section for same. */
|
||||||
|
|
||||||
bfd_size_type minplt_entries; /* Number of minplt entries. */
|
bfd_size_type minplt_entries; /* Number of minplt entries. */
|
||||||
unsigned reltext : 1; /* Are there relocs against readonly sections? */
|
|
||||||
unsigned self_dtpmod_done : 1;/* Has self DTPMOD entry been finished? */
|
unsigned self_dtpmod_done : 1;/* Has self DTPMOD entry been finished? */
|
||||||
bfd_vma self_dtpmod_offset; /* .got offset to self DTPMOD entry. */
|
bfd_vma self_dtpmod_offset; /* .got offset to self DTPMOD entry. */
|
||||||
/* There are maybe R_IA64_GPREL22 relocations, including those
|
/* There are maybe R_IA64_GPREL22 relocations, including those
|
||||||
@ -2951,7 +2950,7 @@ allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
|
|||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
if (rent->reltext)
|
if (rent->reltext)
|
||||||
ia64_info->reltext = 1;
|
x->info->flags |= DF_TEXTREL;
|
||||||
rent->srel->size += sizeof (ElfNN_External_Rela) * count;
|
rent->srel->size += sizeof (ElfNN_External_Rela) * count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3224,11 +3223,10 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
|
|||||||
|| !add_dynamic_entry (DT_RELAENT, sizeof (ElfNN_External_Rela)))
|
|| !add_dynamic_entry (DT_RELAENT, sizeof (ElfNN_External_Rela)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (ia64_info->reltext)
|
if ((info->flags & DF_TEXTREL) != 0)
|
||||||
{
|
{
|
||||||
if (!add_dynamic_entry (DT_TEXTREL, 0))
|
if (!add_dynamic_entry (DT_TEXTREL, 0))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
info->flags |= DF_TEXTREL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user