aboutsummaryrefslogtreecommitdiff
path: root/COPYING3
diff options
context:
space:
mode:
authorHan Shen <shenhan@google.com>2017-07-10 15:23:05 -0700
committerHan Shen <shenhan@google.com>2017-07-11 11:17:56 -0700
commitdf2f63a6a0fc19c54e58aab8afe262baf3cb1a3c (patch)
treeaeebc6c5e935eec557d0ee099ef3d4cc65be36be /COPYING3
parent0aa37b654c0f31e446ab47826f0bcbec15d0112f (diff)
downloadgdb-df2f63a6a0fc19c54e58aab8afe262baf3cb1a3c.zip
gdb-df2f63a6a0fc19c54e58aab8afe262baf3cb1a3c.tar.gz
gdb-df2f63a6a0fc19c54e58aab8afe262baf3cb1a3c.tar.bz2
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 <shenhan@google.com> 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".
Diffstat (limited to 'COPYING3')
0 files changed, 0 insertions, 0 deletions