gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gold / sparc.cc
index 8e66b7772a8ecd8ca3d110448653acf4fead6c1a..e73970afd779c3af6336947a739d7de71ac068b7 100644 (file)
@@ -1,6 +1,6 @@
 // sparc.cc -- sparc target support for gold.
 
-// Copyright (C) 2008-2016 Free Software Foundation, Inc.
+// Copyright (C) 2008-2020 Free Software Foundation, Inc.
 // Written by David S. Miller <davem@davemloft.net>.
 
 // This file is part of gold.
@@ -499,6 +499,7 @@ Target::Target_info Target_sparc<32, true>::sparc_info =
   NULL,                        // attributes_vendor
   "_start",            // entry_symbol_name
   32,                  // hash_entry_size
+  elfcpp::SHT_PROGBITS,        // unwind_section_type
 };
 
 template<>
@@ -527,6 +528,7 @@ Target::Target_info Target_sparc<64, true>::sparc_info =
   NULL,                        // attributes_vendor
   "_start",            // entry_symbol_name
   32,                  // hash_entry_size
+  elfcpp::SHT_PROGBITS,        // unwind_section_type
 };
 
 // We have to take care here, even when operating in little-endian
@@ -2305,7 +2307,7 @@ Target_sparc<size, big_endian>::Scan::local(
                                       reloc.get_r_addend(), is_ifunc);
          break;
        }
-      /* Fall through.  */
+      // Fall through.
 
     case elfcpp::R_SPARC_HIX22:
     case elfcpp::R_SPARC_LOX10:
@@ -2815,6 +2817,7 @@ Target_sparc<size, big_endian>::Scan::global(
          // and code transform the GOT load into an addition.
          break;
        }
+      // Fall through.
     case elfcpp::R_SPARC_GOT10:
     case elfcpp::R_SPARC_GOT13:
     case elfcpp::R_SPARC_GOT22:
@@ -3354,6 +3357,7 @@ Target_sparc<size, big_endian>::Relocate::relocate(
          gdop_valid = true;
          break;
        }
+      // Fall through.
     case elfcpp::R_SPARC_GOT10:
     case elfcpp::R_SPARC_GOT13:
     case elfcpp::R_SPARC_GOT22:
@@ -3475,7 +3479,7 @@ Target_sparc<size, big_endian>::Relocate::relocate(
          Reloc::gdop_lox10(view, got_offset);
          break;
        }
-      /* Fall through.  */
+      // Fall through.
     case elfcpp::R_SPARC_GOT10:
       Reloc::lo10(view, got_offset, addend);
       break;
@@ -3504,7 +3508,7 @@ Target_sparc<size, big_endian>::Relocate::relocate(
          Reloc::gdop_hix22(view, got_offset);
          break;
        }
-      /* Fall through.  */
+      // Fall through.
     case elfcpp::R_SPARC_GOT22:
       Reloc::hi22(view, got_offset, addend);
       break;
@@ -3728,7 +3732,7 @@ Target_sparc<size, big_endian>::Relocate::relocate_tls(
 
   const bool is_final =
     (gsym == NULL
-     ? !parameters->options().output_is_position_independent()
+     ? !parameters->options().shared()
      : gsym->final_value_is_known());
   const tls::Tls_optimization optimized_type
       = optimize_tls_reloc(is_final, r_type);
@@ -4162,7 +4166,7 @@ Target_sparc<size, big_endian>::Relocate::relax_call(
   if (op3 != 0x3d)
     {
       // First check RS1
-      reg = (delay_insn >> 14) & 0x15;
+      reg = (delay_insn >> 14) & 0x1f;
       if (reg == 15)
        return;
 
This page took 0.023811 seconds and 4 git commands to generate.