aboutsummaryrefslogtreecommitdiff
path: root/gold/i386.cc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-12-07 17:14:55 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-12-07 17:14:55 +0000
commit53d7974cd89aa01148a771e83a8ea5a97359f13c (patch)
tree90c35e6efd81254ec9dc191905ab178acc2fe0ff /gold/i386.cc
parentf43525316b6a7a4c300e3198e4dc0bb886cc8dd7 (diff)
downloadgdb-53d7974cd89aa01148a771e83a8ea5a97359f13c.zip
gdb-53d7974cd89aa01148a771e83a8ea5a97359f13c.tar.gz
gdb-53d7974cd89aa01148a771e83a8ea5a97359f13c.tar.bz2
2009-12-07 H.J. Lu <hongjiu.lu@intel.com>
PR gold/10893 * i386.cc (Target_i386::Scan::globa): Use is_func instead of checking elfcpp::STT_FUNC. (Target_i386::Relocate::relocate): Likewise. * x86_64.cc (Target_x86_64::Scan::global): Likewise. * symtab.cc (Symbol_table::sized_write_symbol): Turn IFUNC symbols from shared libraries into normal FUNC symbols. * symtab.h (Symbol): Add is_func and use it.
Diffstat (limited to 'gold/i386.cc')
-rw-r--r--gold/i386.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gold/i386.cc b/gold/i386.cc
index f61e168..4820f15 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -1248,7 +1248,7 @@ Target_i386::Scan::global(Symbol_table* symtab,
}
// Make a dynamic relocation if necessary.
int flags = Symbol::NON_PIC_REF;
- if (gsym->type() == elfcpp::STT_FUNC)
+ if (gsym->is_func())
flags |= Symbol::FUNCTION_CALL;
if (gsym->needs_dynamic_reloc(flags))
{
@@ -1727,7 +1727,7 @@ Target_i386::Relocate::relocate(const Relocate_info<32, false>* relinfo,
case elfcpp::R_386_PC32:
{
int ref_flags = Symbol::NON_PIC_REF;
- if (gsym != NULL && gsym->type() == elfcpp::STT_FUNC)
+ if (gsym != NULL && gsym->is_func())
ref_flags |= Symbol::FUNCTION_CALL;
if (should_apply_static_reloc(gsym, ref_flags, true, output_section))
Relocate_functions<32, false>::pcrel32(view, object, psymval, address);
@@ -1743,7 +1743,7 @@ Target_i386::Relocate::relocate(const Relocate_info<32, false>* relinfo,
case elfcpp::R_386_PC16:
{
int ref_flags = Symbol::NON_PIC_REF;
- if (gsym != NULL && gsym->type() == elfcpp::STT_FUNC)
+ if (gsym != NULL && gsym->is_func())
ref_flags |= Symbol::FUNCTION_CALL;
if (should_apply_static_reloc(gsym, ref_flags, false, output_section))
Relocate_functions<32, false>::pcrel16(view, object, psymval, address);
@@ -1759,7 +1759,7 @@ Target_i386::Relocate::relocate(const Relocate_info<32, false>* relinfo,
case elfcpp::R_386_PC8:
{
int ref_flags = Symbol::NON_PIC_REF;
- if (gsym != NULL && gsym->type() == elfcpp::STT_FUNC)
+ if (gsym != NULL && gsym->is_func())
ref_flags |= Symbol::FUNCTION_CALL;
if (should_apply_static_reloc(gsym, ref_flags, false,
output_section))