aboutsummaryrefslogtreecommitdiff
path: root/gold/i386.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/i386.cc')
-rw-r--r--gold/i386.cc7
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,