aboutsummaryrefslogtreecommitdiff
path: root/gold/x86_64.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-01-23 07:15:59 +0000
committerIan Lance Taylor <iant@google.com>2008-01-23 07:15:59 +0000
commit0700cf329e7579515fb775fa0ccb8b4f623e7ea9 (patch)
treee85a5c586a303a545d637ba42592aec531d02dc8 /gold/x86_64.cc
parent7bf81d63025ff1b953e40c7610889ae3680af0a0 (diff)
downloadgdb-0700cf329e7579515fb775fa0ccb8b4f623e7ea9.zip
gdb-0700cf329e7579515fb775fa0ccb8b4f623e7ea9.tar.gz
gdb-0700cf329e7579515fb775fa0ccb8b4f623e7ea9.tar.bz2
From Cary Coutant: Fix mixing PIC and non-PIC relocs in the same
shared library.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r--gold/x86_64.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index afa8070..0b791f2 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -1032,7 +1032,7 @@ Target_x86_64::Scan::global(const General_options& options,
gsym->set_needs_dynsym_value();
}
// Make a dynamic relocation if necessary.
- if (gsym->needs_dynamic_reloc(true, false))
+ if (gsym->needs_dynamic_reloc(Symbol::ABSOLUTE_REF))
{
if (target->may_need_copy_reloc(gsym))
{
@@ -1068,8 +1068,10 @@ Target_x86_64::Scan::global(const General_options& options,
if (gsym->needs_plt_entry())
target->make_plt_entry(symtab, layout, gsym);
// Make a dynamic relocation if necessary.
- bool is_function_call = (gsym->type() == elfcpp::STT_FUNC);
- if (gsym->needs_dynamic_reloc(false, is_function_call))
+ int flags = Symbol::NON_PIC_REF;
+ if (gsym->type() == elfcpp::STT_FUNC)
+ flags |= Symbol::FUNCTION_CALL;
+ if (gsym->needs_dynamic_reloc(flags))
{
if (target->may_need_copy_reloc(gsym))
{