aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-03-28 01:12:56 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-03-28 01:13:38 -0700
commit75933d84fb26fe2af42a405fb701a66d35c93721 (patch)
treefb063c03bf2ce1273e24e9b42e78fb2c04e9502e /binutils
parentc18608a207dba12b13e0015a4b43a5f223ef605f (diff)
downloadriscv-gnu-toolchain-75933d84fb26fe2af42a405fb701a66d35c93721.zip
riscv-gnu-toolchain-75933d84fb26fe2af42a405fb701a66d35c93721.tar.gz
riscv-gnu-toolchain-75933d84fb26fe2af42a405fb701a66d35c93721.tar.bz2
binutils: cope with GNU ifuncs
h/t Matt Thomas
Diffstat (limited to 'binutils')
-rw-r--r--binutils/bfd/elfnn-riscv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/bfd/elfnn-riscv.c b/binutils/bfd/elfnn-riscv.c
index 3188ef8..74f6e0b 100644
--- a/binutils/bfd/elfnn-riscv.c
+++ b/binutils/bfd/elfnn-riscv.c
@@ -860,6 +860,7 @@ riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
&& (h->needs_plt
+ || h->type == STT_GNU_IFUNC
|| h->u.weakdef != NULL
|| (h->def_dynamic
&& h->ref_regular
@@ -868,7 +869,7 @@ riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later
(although we could actually do it here). */
- if (h->type == STT_FUNC || h->needs_plt)
+ if (h->type == STT_FUNC || h->type == STT_GNU_IFUNC || h->needs_plt)
{
if (h->plt.refcount <= 0
|| SYMBOL_CALLS_LOCAL (info, h)