aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-07-10 10:04:20 +0000
committerAlan Modra <amodra@gmail.com>2009-07-10 10:04:20 +0000
commit7ae26bc141a487736f8590300fa40cf58daf4123 (patch)
treecbcebca2c4f34eb9be735a0715f403eab5c98d39 /bfd/elflink.c
parentaf7b385cb919238f308d411e029defe23179aadb (diff)
downloadgdb-7ae26bc141a487736f8590300fa40cf58daf4123.zip
gdb-7ae26bc141a487736f8590300fa40cf58daf4123.tar.gz
gdb-7ae26bc141a487736f8590300fa40cf58daf4123.tar.bz2
* 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.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 9932186..4d54add 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -4290,10 +4290,6 @@ error_free_dyn:
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. */
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.
STT_GNU_IFUNC symbol must go through PLT. */
if ((h->type == STT_GNU_IFUNC
- && h->ref_regular
+ && h->def_regular
&& !finfo->info->relocatable)
|| ((h->dynindx != -1
|| h->forced_local)