This is the mail archive of the binutils@sourceware.org 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]

[PATCH][GOLD] Fix PR0765 [2.27 Regression] gold internal error in fix_errata on aarch64-linux-gnu


Hello,

I've recently investigated
https://sourceware.org/bugzilla/show_bug.cgi?id=20765 which is an
internal fault in gold when the --fix-cortex-a53-843419 is applied.
The bug is reported against 2.27 but still exists on trunk. The test
case gitit is a very large program that uses two stub tables for the
.text output section.

The full details are in the PR, to summarise:
- The internal fault is caused when there is more than one stub table
and the addresses in the second stub table are dependent on the size
of the first stub table. As the erratum stub addresses are only set
once, an internal fault is triggered at relocation time when the
inconsistency is detected.
- The patch is to update the erratum stub addresses on each relaxation pass.

After fixing the internal fault, I noticed that about 1/3 of the
erratum stubs were being created and written to the file, but were
being incorrectly skipped over by
fix_errata_and_relocate_erratum_stubs(). This is a separate problem
that, while more likely to hit large programs, could in theory hit
smaller programs so I'll send a separate message with a fix for that.

Peter

Attachment: gold_update_erratum_stub_addresses.diff
Description: Text document


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