]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix internal error when relaxing branches to STT_SECTION symbols.
authorCary Coutant <ccoutant@gmail.com>
Thu, 1 Dec 2016 20:50:21 +0000 (12:50 -0800)
committerAlan Modra <amodra@gmail.com>
Tue, 21 Feb 2017 23:10:20 +0000 (09:40 +1030)
gold/
PR gold/20807
* aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle
section symbols correctly.
* arm.cc (Target_arm): Likewise.
* powerpc.cc (Target_powerpc): Likewise.

gold/ChangeLog
gold/aarch64.cc
gold/arm.cc
gold/powerpc.cc

index 8e897f845436c152494fad6e5ef7bf326f7b99b0..39536ac98cca8695d35e9c2a5327e09b56b9a75e 100644 (file)
@@ -1,6 +1,13 @@
 2017-02-22  Alan Modra  <amodra@gmail.com>
 
        Apply from master
+       2016-12-01  Cary Coutant  <ccoutant@gmail.com>
+       PR gold/20807
+       * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle
+       section symbols correctly.
+       * arm.cc (Target_arm): Likewise.
+       * powerpc.cc (Target_powerpc): Likewise.
+
        2016-08-31  Alan Modra  <amodra@gmail.com>
        * powerpc.cc (class Stub_control): Delete stub14_group_size_
        and has14_.  Add group_size_.
index db9f06c1c67d1b67f389331cd17a2de570691ac4..f31e0918d73db0542ccf4105a3b14b045f800142 100644 (file)
@@ -3865,6 +3865,8 @@ Target_aarch64<size, big_endian>::scan_reloc_section_for_stubs(
          if (!is_defined_in_discarded_section)
            {
              typedef Sized_relobj_file<size, big_endian> ObjType;
+             if (psymval->is_section_symbol())
+               symval.set_is_section_symbol();
              typename ObjType::Compute_final_local_value_status status =
                object->compute_final_local_value(r_sym, psymval, &symval,
                                                  relinfo->symtab);
index c47b00224cc7c0c15c28ae69a9d2893684e58caa..9120279f83f261f8836bbf1238ac42d1f8956a2f 100644 (file)
@@ -11998,6 +11998,8 @@ Target_arm<big_endian>::scan_reloc_section_for_stubs(
          if (!is_defined_in_discarded_section)
            {
              typedef Sized_relobj_file<32, big_endian> ObjType;
+             if (psymval->is_section_symbol())
+               symval.set_is_section_symbol();
              typename ObjType::Compute_final_local_value_status status =
                arm_object->compute_final_local_value(r_sym, psymval, &symval,
                                                      relinfo->symtab);
index 8f5d259927d72b250c2572da8bd051937724589b..2e85530f0094a577fcd33b2e30739f4ab23bc29a 100644 (file)
@@ -2799,6 +2799,8 @@ Target_powerpc<size, big_endian>::Branch_info::make_stub(
          const Symbol_value<size>* psymval
            = this->object_->local_symbol(this->r_sym_);
          Symbol_value<size> symval;
+         if (psymval->is_section_symbol())
+           symval.set_is_section_symbol();
          typedef Sized_relobj_file<size, big_endian> ObjType;
          typename ObjType::Compute_final_local_value_status status
            = this->object_->compute_final_local_value(this->r_sym_, psymval,