aboutsummaryrefslogtreecommitdiff
path: root/gold/x86_64.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-12 17:51:55 +0000
committerIan Lance Taylor <iant@google.com>2007-11-12 17:51:55 +0000
commit386c048c7aebbff667dbbddd6a4b68299d1920dd (patch)
treea9561b2b3c9e5cedca1e8657b5557397d17bee5c /gold/x86_64.cc
parent42477147784af654eef24100761b57b8de44c802 (diff)
downloadgdb-386c048c7aebbff667dbbddd6a4b68299d1920dd.zip
gdb-386c048c7aebbff667dbbddd6a4b68299d1920dd.tar.gz
gdb-386c048c7aebbff667dbbddd6a4b68299d1920dd.tar.bz2
Correct handling of GOT references in a regular object.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r--gold/x86_64.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 5bc74bf..0614e89 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -1020,7 +1020,8 @@ Target_x86_64::Scan::global(const General_options& options,
if (!gsym->final_value_is_known())
{
Reloc_section* rela_dyn = target->rela_dyn_section(layout);
- if (gsym->is_preemptible())
+ if (gsym->is_from_dynobj()
+ || gsym->is_preemptible())
rela_dyn->add_global(gsym, elfcpp::R_X86_64_GLOB_DAT, got,
gsym->got_offset(), 0);
else