mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
Replace _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot
* elf32-i386.c (elf_i386_size_dynamic_sections): Replace _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2012-10-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* elf32-i386.c (elf_i386_size_dynamic_sections): Replace
|
||||||
|
_GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot.
|
||||||
|
* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
|
||||||
|
|
||||||
2012-10-24 H.J. Lu <hongjiu.lu@intel.com>
|
2012-10-24 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* compress.c (bfd_is_section_compressed): Don't decompress the
|
* compress.c (bfd_is_section_compressed): Don't decompress the
|
||||||
|
@ -2863,15 +2863,10 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
|||||||
|
|
||||||
if (htab->elf.sgotplt)
|
if (htab->elf.sgotplt)
|
||||||
{
|
{
|
||||||
struct elf_link_hash_entry *got;
|
|
||||||
got = elf_link_hash_lookup (elf_hash_table (info),
|
|
||||||
"_GLOBAL_OFFSET_TABLE_",
|
|
||||||
FALSE, FALSE, FALSE);
|
|
||||||
|
|
||||||
/* Don't allocate .got.plt section if there are no GOT nor PLT
|
/* Don't allocate .got.plt section if there are no GOT nor PLT
|
||||||
entries and there is no reference to _GLOBAL_OFFSET_TABLE_. */
|
entries and there is no reference to _GLOBAL_OFFSET_TABLE_. */
|
||||||
if ((got == NULL
|
if ((htab->elf.hgot == NULL
|
||||||
|| !got->ref_regular_nonweak)
|
|| !htab->elf.hgot->ref_regular_nonweak)
|
||||||
&& (htab->elf.sgotplt->size
|
&& (htab->elf.sgotplt->size
|
||||||
== get_elf_backend_data (output_bfd)->got_header_size)
|
== get_elf_backend_data (output_bfd)->got_header_size)
|
||||||
&& (htab->elf.splt == NULL
|
&& (htab->elf.splt == NULL
|
||||||
|
@ -2917,15 +2917,10 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
|
|||||||
|
|
||||||
if (htab->elf.sgotplt)
|
if (htab->elf.sgotplt)
|
||||||
{
|
{
|
||||||
struct elf_link_hash_entry *got;
|
|
||||||
got = elf_link_hash_lookup (elf_hash_table (info),
|
|
||||||
"_GLOBAL_OFFSET_TABLE_",
|
|
||||||
FALSE, FALSE, FALSE);
|
|
||||||
|
|
||||||
/* Don't allocate .got.plt section if there are no GOT nor PLT
|
/* Don't allocate .got.plt section if there are no GOT nor PLT
|
||||||
entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */
|
entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */
|
||||||
if ((got == NULL
|
if ((htab->elf.hgot == NULL
|
||||||
|| !got->ref_regular_nonweak)
|
|| !htab->elf.hgot->ref_regular_nonweak)
|
||||||
&& (htab->elf.sgotplt->size
|
&& (htab->elf.sgotplt->size
|
||||||
== get_elf_backend_data (output_bfd)->got_header_size)
|
== get_elf_backend_data (output_bfd)->got_header_size)
|
||||||
&& (htab->elf.splt == NULL
|
&& (htab->elf.splt == NULL
|
||||||
|
Reference in New Issue
Block a user