Support compressed debug sections in dynamic object files.
[deliverable/binutils-gdb.git] / gold / tilegx.cc
index c3918b92a424a3edef42bfe0beb8d096db55207d..5d972715477aee0cada2eb6c200802680e95139d 100644 (file)
@@ -1,6 +1,6 @@
 // tilegx.cc -- tilegx target support for gold.
 
-// Copyright 2012, 2013 Free Software Foundation, Inc.
+// Copyright (C) 2012-2015 Free Software Foundation, Inc.
 // Written by Jiong Wang (jiwang@tilera.com)
 
 // This file is part of gold.
@@ -239,7 +239,7 @@ class Target_tilegx : public Sized_target<size, big_endian>
       got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
       global_offset_table_(NULL), tilegx_dynamic_(NULL), rela_dyn_(NULL),
       rela_irelative_(NULL), copy_relocs_(elfcpp::R_TILEGX_COPY),
-      dynbss_(NULL), got_mod_index_offset_(-1U),
+      got_mod_index_offset_(-1U),
       tls_get_addr_sym_defined_(false)
   { }
 
@@ -650,8 +650,6 @@ class Target_tilegx : public Sized_target<size, big_endian>
   Reloc_section* rela_irelative_;
   // Relocs saved to avoid a COPY reloc.
   Copy_relocs<elfcpp::SHT_RELA, size, big_endian> copy_relocs_;
-  // Space for variables copied with a COPY reloc.
-  Output_data_space* dynbss_;
   // Offset of the GOT entry for the TLS module index.
   unsigned int got_mod_index_offset_;
   // True if the _tls_get_addr symbol has been defined.
@@ -3760,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);
@@ -3834,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);
This page took 0.0264 seconds and 4 git commands to generate.