X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gold%2Ftilegx.cc;h=1a14deaf7de30e55e3bf11f4792ef23e2b9a2bf7;hb=711833262c7a413b10a32f01153454bc5a53a5a6;hp=576a28c6ecd5f359a01834f3c6225b29649f0e0a;hpb=43819297ce3e76908a840fa66159ca83c1560fe5;p=platform%2Fupstream%2Fbinutils.git diff --git a/gold/tilegx.cc b/gold/tilegx.cc index 576a28c..1a14dea 100644 --- a/gold/tilegx.cc +++ b/gold/tilegx.cc @@ -1,6 +1,6 @@ // tilegx.cc -- tilegx target support for gold. -// Copyright 2012, 2013 Free Software Foundation, Inc. +// Copyright (C) 2012-2014 Free Software Foundation, Inc. // Written by Jiong Wang (jiwang@tilera.com) // This file is part of gold. @@ -3758,7 +3758,8 @@ Target_tilegx::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::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);