diff options
author | Ian Lance Taylor <iant@google.com> | 2007-11-12 17:51:55 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-11-12 17:51:55 +0000 |
commit | 386c048c7aebbff667dbbddd6a4b68299d1920dd (patch) | |
tree | a9561b2b3c9e5cedca1e8657b5557397d17bee5c /gold/i386.cc | |
parent | 42477147784af654eef24100761b57b8de44c802 (diff) | |
download | gdb-386c048c7aebbff667dbbddd6a4b68299d1920dd.zip gdb-386c048c7aebbff667dbbddd6a4b68299d1920dd.tar.gz gdb-386c048c7aebbff667dbbddd6a4b68299d1920dd.tar.bz2 |
Correct handling of GOT references in a regular object.
Diffstat (limited to 'gold/i386.cc')
-rw-r--r-- | gold/i386.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gold/i386.cc b/gold/i386.cc index dcbb839..eae6b7f 100644 --- a/gold/i386.cc +++ b/gold/i386.cc @@ -1046,9 +1046,10 @@ Target_i386::Scan::global(const General_options& options, if (!gsym->final_value_is_known()) { Reloc_section* rel_dyn = target->rel_dyn_section(layout); - if (gsym->is_preemptible()) - rel_dyn->add_global(gsym, elfcpp::R_386_GLOB_DAT, got, - gsym->got_offset()); + if (gsym->is_from_dynobj() + || gsym->is_preemptible()) + rel_dyn->add_global(gsym, elfcpp::R_386_GLOB_DAT, got, + gsym->got_offset()); else { rel_dyn->add_local(object, 0, elfcpp::R_386_RELATIVE, |