This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_27-branch] Fix internal error when relaxing branches to STT_SECTION symbols.
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 21 Feb 2017 23:32:13 -0000
- Subject: [binutils-gdb/binutils-2_27-branch] Fix internal error when relaxing branches to STT_SECTION symbols.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=93ac3bd2dbc5388794801dc4caf5cb27a23fecb0
commit 93ac3bd2dbc5388794801dc4caf5cb27a23fecb0
Author: Cary Coutant <ccoutant@gmail.com>
Date: Thu Dec 1 12:50:21 2016 -0800
Fix internal error when relaxing branches to STT_SECTION symbols.
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.
Diff:
---
gold/ChangeLog | 7 +++++++
gold/aarch64.cc | 2 ++
gold/arm.cc | 2 ++
gold/powerpc.cc | 2 ++
4 files changed, 13 insertions(+)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 8e897f8..39536ac 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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_.
diff --git a/gold/aarch64.cc b/gold/aarch64.cc
index db9f06c..f31e091 100644
--- a/gold/aarch64.cc
+++ b/gold/aarch64.cc
@@ -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);
diff --git a/gold/arm.cc b/gold/arm.cc
index c47b002..9120279 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -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);
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 8f5d259..2e85530 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -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,