diff options
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r-- | gold/powerpc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 0589d0c..b9ee86e 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -5819,7 +5819,8 @@ Target_powerpc<size, big_endian>::Scan::global( if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type, target)) || (size == 64 && is_ifunc && target->abiversion() < 2)) { - 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); @@ -5882,7 +5883,8 @@ Target_powerpc<size, big_endian>::Scan::global( // Make a dynamic relocation if necessary. if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type, target))) { - 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, |