diff options
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 7427f8e..7e8a890 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -2810,11 +2810,16 @@ Symbol_table::sized_write_symbol( osym.put_st_size(0); 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; // 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, sym->type())); + osym.put_st_info(elfcpp::elf_st_info(elfcpp::STB_LOCAL, type)); else - osym.put_st_info(elfcpp::elf_st_info(sym->binding(), sym->type())); + osym.put_st_info(elfcpp::elf_st_info(sym->binding(), type)); osym.put_st_other(elfcpp::elf_st_other(sym->visibility(), sym->nonvis())); osym.put_st_shndx(shndx); } |