This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix segfault in relocate_erratum_stub on aarch64.;h=036aae79303c43c56b604bc215ce4a70fc2a6474

commit 036aae79303c43c56b604bc215ce4a70fc2a6474
Author: Peter Smith <>
Date:   Thu Nov 30 13:30:58 2017 -0800

    Fix segfault in relocate_erratum_stub on aarch64.
    The fix for PR21868 (an internal error when --fix-cortex-a53-843419
    is applied) has a small mistake in it. When the stub_owner section
    needs an erratum fix an incorrect address for the stubs for the section
    is given to relocate_erratum_stub. If we are lucky we will get a segfault;
    if we aren't, an incorrect patch or data corruption is possible.
    The error is visible in PR21868, but the side-effects aren't fatal.
    	PR gold/22233
    	* (AArch64_relobj::fix_errata_and_relocate_erratum_stubs):
    	Fix calculation of stub address.

 gold/ChangeLog  | 6 ++++++
 gold/ | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index b0014d3..49853f5 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,9 @@
+2017-11-30  Peter Smith  <>
+	PR gold/22233
+	* (AArch64_relobj::fix_errata_and_relocate_erratum_stubs):
+	Fix calculation of stub address.
 2017-11-29  Stefan Stroe  <>
 	* po/Make-in (datadir): Define as @datadir@.
diff --git a/gold/ b/gold/
index 4c6e920..02fabb7 100644
--- a/gold/
+++ b/gold/
@@ -2041,7 +2041,7 @@ AArch64_relobj<size, big_endian>::fix_errata_and_relocate_erratum_stubs(
           // executed.
-	    pview.view + view_offset + (stub_table->address() - pview.address));
+	    pview.view + (stub_table->address() - pview.address));
           // Next erratum stub.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]