forked from Imagelibrary/binutils-gdb
* elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
and ref_regular_nonweak comment. * elflink.c (elf_link_output_extsym): Special case ifunc syms when def_regular, not ref_regular. (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,.. * elf32-i386.c (elf_i386_check_relocs): ..set it here instead.. * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
This commit is contained in:
@@ -1,3 +1,13 @@
|
|||||||
|
2009-07-10 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
|
||||||
|
and ref_regular_nonweak comment.
|
||||||
|
* elflink.c (elf_link_output_extsym): Special case ifunc syms
|
||||||
|
when def_regular, not ref_regular.
|
||||||
|
(elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
|
||||||
|
* elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
|
||||||
|
* elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
|
||||||
|
|
||||||
2009-07-09 Alan Modra <amodra@bigpond.net.au>
|
2009-07-09 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
|
* elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
|
||||||
|
|||||||
@@ -138,7 +138,8 @@ struct elf_link_hash_entry
|
|||||||
/* Symbol st_other value, symbol visibility. */
|
/* Symbol st_other value, symbol visibility. */
|
||||||
unsigned int other : 8;
|
unsigned int other : 8;
|
||||||
|
|
||||||
/* Symbol is referenced by a non-shared object. */
|
/* Symbol is referenced by a non-shared object (other than the object
|
||||||
|
in which it is defined). */
|
||||||
unsigned int ref_regular : 1;
|
unsigned int ref_regular : 1;
|
||||||
/* Symbol is defined by a non-shared object. */
|
/* Symbol is defined by a non-shared object. */
|
||||||
unsigned int def_regular : 1;
|
unsigned int def_regular : 1;
|
||||||
@@ -146,7 +147,8 @@ struct elf_link_hash_entry
|
|||||||
unsigned int ref_dynamic : 1;
|
unsigned int ref_dynamic : 1;
|
||||||
/* Symbol is defined by a shared object. */
|
/* Symbol is defined by a shared object. */
|
||||||
unsigned int def_dynamic : 1;
|
unsigned int def_dynamic : 1;
|
||||||
/* Symbol has a non-weak reference from a non-shared object. */
|
/* Symbol has a non-weak reference from a non-shared object (other than
|
||||||
|
the object in which it is defined). */
|
||||||
unsigned int ref_regular_nonweak : 1;
|
unsigned int ref_regular_nonweak : 1;
|
||||||
/* Dynamic symbol has been adjustd. */
|
/* Dynamic symbol has been adjustd. */
|
||||||
unsigned int dynamic_adjusted : 1;
|
unsigned int dynamic_adjusted : 1;
|
||||||
|
|||||||
@@ -1366,6 +1366,7 @@ elf_i386_check_relocs (bfd *abfd,
|
|||||||
{
|
{
|
||||||
/* It is referenced by a non-shared object. */
|
/* It is referenced by a non-shared object. */
|
||||||
h->ref_regular = 1;
|
h->ref_regular = 1;
|
||||||
|
h->needs_plt = 1;
|
||||||
|
|
||||||
/* STT_GNU_IFUNC symbol must go through PLT. */
|
/* STT_GNU_IFUNC symbol must go through PLT. */
|
||||||
h->plt.refcount += 1;
|
h->plt.refcount += 1;
|
||||||
|
|||||||
@@ -1150,6 +1150,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
|||||||
{
|
{
|
||||||
/* It is referenced by a non-shared object. */
|
/* It is referenced by a non-shared object. */
|
||||||
h->ref_regular = 1;
|
h->ref_regular = 1;
|
||||||
|
h->needs_plt = 1;
|
||||||
|
|
||||||
/* STT_GNU_IFUNC symbol must go through PLT. */
|
/* STT_GNU_IFUNC symbol must go through PLT. */
|
||||||
h->plt.refcount += 1;
|
h->plt.refcount += 1;
|
||||||
|
|||||||
@@ -4290,10 +4290,6 @@ error_free_dyn:
|
|||||||
h->type = ELF_ST_TYPE (isym->st_info);
|
h->type = ELF_ST_TYPE (isym->st_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* STT_GNU_IFUNC symbol must go through PLT. */
|
|
||||||
if (h->type == STT_GNU_IFUNC)
|
|
||||||
h->needs_plt = 1;
|
|
||||||
|
|
||||||
/* Merge st_other field. */
|
/* Merge st_other field. */
|
||||||
elf_merge_st_other (abfd, h, isym, definition, dynamic);
|
elf_merge_st_other (abfd, h, isym, definition, dynamic);
|
||||||
|
|
||||||
@@ -8657,7 +8653,7 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
|
|||||||
forced local syms when non-shared is due to a historical quirk.
|
forced local syms when non-shared is due to a historical quirk.
|
||||||
STT_GNU_IFUNC symbol must go through PLT. */
|
STT_GNU_IFUNC symbol must go through PLT. */
|
||||||
if ((h->type == STT_GNU_IFUNC
|
if ((h->type == STT_GNU_IFUNC
|
||||||
&& h->ref_regular
|
&& h->def_regular
|
||||||
&& !finfo->info->relocatable)
|
&& !finfo->info->relocatable)
|
||||||
|| ((h->dynindx != -1
|
|| ((h->dynindx != -1
|
||||||
|| h->forced_local)
|
|| h->forced_local)
|
||||||
|
|||||||
Reference in New Issue
Block a user