mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 02:50:08 +08:00
* elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
relocation entries for weak undefined symbols with non-default visibility. (elf64_x86_64_relocate_section): Initialize the GOT entries and skip R_386_32/R_386_PC32 for weak undefined symbols with non-default visibility.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2003-05-05 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
|
||||||
|
relocation entries for weak undefined symbols with non-default
|
||||||
|
visibility.
|
||||||
|
(elf64_x86_64_relocate_section): Initialize the GOT entries and
|
||||||
|
skip R_386_32/R_386_PC32 for weak undefined symbols with
|
||||||
|
non-default visibility.
|
||||||
|
|
||||||
2003-05-04 H.J. Lu <hjl@gnu.org>
|
2003-05-04 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
|
* elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
|
||||||
|
@ -1396,7 +1396,9 @@ allocate_dynrelocs (h, inf)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
|
if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||||
|
|| h->root.type != bfd_link_hash_undefweak)
|
||||||
|
&& WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
|
||||||
{
|
{
|
||||||
asection *s = htab->splt;
|
asection *s = htab->splt;
|
||||||
|
|
||||||
@ -1478,7 +1480,9 @@ allocate_dynrelocs (h, inf)
|
|||||||
htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
|
htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
|
||||||
else if (tls_type == GOT_TLS_GD)
|
else if (tls_type == GOT_TLS_GD)
|
||||||
htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
|
htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
|
||||||
else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
|
else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||||
|
|| h->root.type != bfd_link_hash_undefweak)
|
||||||
|
&& WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
|
||||||
htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
|
htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1976,7 +1980,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
&& (info->symbolic
|
&& (info->symbolic
|
||||||
|| h->dynindx == -1
|
|| h->dynindx == -1
|
||||||
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
|
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
|
||||||
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
|
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
|
||||||
|
|| (ELF_ST_VISIBILITY (h->other)
|
||||||
|
&& h->root.type == bfd_link_hash_undefweak))
|
||||||
{
|
{
|
||||||
/* This is actually a static link, or it is a -Bsymbolic
|
/* This is actually a static link, or it is a -Bsymbolic
|
||||||
link and the symbol is defined locally, or the symbol
|
link and the symbol is defined locally, or the symbol
|
||||||
@ -2095,6 +2101,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if ((info->shared
|
if ((info->shared
|
||||||
|
&& (h == NULL
|
||||||
|
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||||
|
|| h->root.type != bfd_link_hash_undefweak)
|
||||||
&& ((r_type != R_X86_64_PC8
|
&& ((r_type != R_X86_64_PC8
|
||||||
&& r_type != R_X86_64_PC16
|
&& r_type != R_X86_64_PC16
|
||||||
&& r_type != R_X86_64_PC32)
|
&& r_type != R_X86_64_PC32)
|
||||||
|
Reference in New Issue
Block a user