[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/21491] --fix-cortex-a53-843419 Errata workaround can produce b
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug gold/21491] --fix-cortex-a53-843419 Errata workaround can produce broken images |
Date: |
Wed, 12 Jul 2017 14:29:12 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21491
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The binutils-2_29-branch branch has been updated by Cary Coutant
<address@hidden>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d3dc405d0d3e106ef75dd126b9c03b463af6f51b
commit d3dc405d0d3e106ef75dd126b9c03b463af6f51b
Author: Han Shen <address@hidden>
Date: Mon Jul 10 15:23:05 2017 -0700
Fixing for PR gold/21491 - Errata workaround can produce broken images.
The problem is caused by the fact that gold is relocating the stubs
for an entire output section when it processes the relocations for a
particular input section that happened to be designated as the stub
table "owner". The Relocate_task for that input section may or may not
run before the Relocate_task for another input section that contains
the code that needs the erratum fix, but doesn't "own" the stub
table. If it runs before (or might even race with) that other task, it
ends up with a copy of the unrelocated original instruction.
In other words - when calling fix_errata() from
do_relocate_sections(), gold is going through the list of errata stubs
that are associated only with that object. This routine updates the
stored original instruction and replaces it in the output view with a
branch to the stub. Later, as gold is going through the object file's
input sections, it then checks for stub tables "owned" by each input
section, and writes out all the stubs from that stub table, regardless
of what object file each stub is associated with.
Fixed by relocating the erratum stub only after the corresponding
errata spot is fixed. That is to have fix_errata() call
Stub_table::relocate_erratum_stub() for each stub.
gold/ChangeLog
2017-07-06 Han Shen <address@hidden>
PR gold/21491
* aarch64.cc (Erratum_stub::invalidate_erratum_stub): New method.
(Erratum_stub::is_invalidated_erratum_stub): New method.
(Stub_table::relocate_reloc_stub): Renamed from "relocate_stub".
(Stub_table::relocate_reloc_stubs): Renamed from "relocate_stubs".
(Stub_table::relocate_erratum_stub): New method.
(AArch64_relobj::fix_errata_and_relocate_erratum_stubs): Renamed from
"fix_errata".
(Target_aarch64::relocate_reloc_stub): Renamed from "relocate_stub".
--
You are receiving this mail because:
You are on the CC list for the bug.