diff options
Diffstat (limited to 'gold/tilegx.cc')
-rw-r--r-- | gold/tilegx.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gold/tilegx.cc b/gold/tilegx.cc index c194587..1a14dea 100644 --- a/gold/tilegx.cc +++ b/gold/tilegx.cc @@ -3758,7 +3758,8 @@ Target_tilegx<size, big_endian>::Scan::global(Symbol_table* symtab, // Make a dynamic relocation if necessary. if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type))) { - if (gsym->may_need_copy_reloc()) + if (!parameters->options().output_is_position_independent() + && gsym->may_need_copy_reloc()) { target->copy_reloc(symtab, layout, object, data_shndx, output_section, gsym, reloc); @@ -3832,7 +3833,8 @@ Target_tilegx<size, big_endian>::Scan::global(Symbol_table* symtab, // Make a dynamic relocation if necessary. if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type))) { - if (gsym->may_need_copy_reloc()) + if (parameters->options().output_is_executable() + && gsym->may_need_copy_reloc()) { target->copy_reloc(symtab, layout, object, data_shndx, output_section, gsym, reloc); |