aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-09-02 04:14:21 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-09-02 04:17:43 -0700
commit358de98820c5e9caa222846ba8b646de6cc091c8 (patch)
tree5fad77fceea123768e3893418af7645f4666910e /gold/symtab.cc
parentd49044c7530d28894e73763c21c417a423e4297c (diff)
downloadgdb-358de98820c5e9caa222846ba8b646de6cc091c8.zip
gdb-358de98820c5e9caa222846ba8b646de6cc091c8.tar.gz
gdb-358de98820c5e9caa222846ba8b646de6cc091c8.tar.bz2
Turn IFUNC symbols from shared libraries into normal FUNC symbols
Turn IFUNC symbols from shared libraries into normal FUNC symbols when we are resolving symbol references, instead of when we are writing out the symbol table. PR gold/18886 * resolve.cc (Symbol::override_base): Turn IFUNC symbols from shared libraries into normal FUNC symbols. * symtab.cc (Symbol_table::sized_write_symbol): Assert IFUNC symbols aren't from shared libraries.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index c6b47b0..c0d21d6 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -3130,10 +3130,7 @@ Symbol_table::sized_write_symbol(
else
osym.put_st_size(sym->symsize());
elfcpp::STT type = sym->type();
- // Turn IFUNC symbols from shared libraries into normal FUNC symbols.
- if (type == elfcpp::STT_GNU_IFUNC
- && sym->is_from_dynobj())
- type = elfcpp::STT_FUNC;
+ gold_assert(type != elfcpp::STT_GNU_IFUNC || !sym->is_from_dynobj());
// A version script may have overridden the default binding.
if (sym->is_forced_local())
osym.put_st_info(elfcpp::elf_st_info(elfcpp::STB_LOCAL, type));