[PATCH] D36749: [LLD][ELF][AArch64] Complete implementation of -fix-cortex-a53-843419

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 09:37:16 PDT 2017


peter.smith updated this revision to Diff 115855.
peter.smith added a comment.

I've refactored the patch in an attempt to simplify it. The involves a change of strategy to make each patch its own SyntheticSection, this has the following implications:

- We can get rid of the distinction between Patches and PatchSections, there is one instance of a Patch843419Section per erratum instance.
- We can't round up the size of an individual Patch843419Section to avoid disturbing the page-offset of subsequent sections as this would be too wasteful in size.
- As adding one or more Patch843419Sections may disturb the page offset of following sections, we have to do multiple passes until no more Patches are added.
- I've converted the function into a class so we only need to create the SectionMap once.
- Updated the tests to account for the smaller patches.

It is debatable whether this is significantly simpler than before, however it should integrate better with RangeThunks should they be implemented for AArch64.


https://reviews.llvm.org/D36749

Files:
  ELF/SectionPatcher.cpp
  ELF/SectionPatcher.h
  ELF/Writer.cpp
  test/ELF/aarch64-cortex-a53-843419-address.s
  test/ELF/aarch64-cortex-a53-843419-recognize.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36749.115855.patch
Type: text/x-patch
Size: 44921 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/ef35345a/attachment.bin>


More information about the llvm-commits mailing list