Thread (103 messages) 103 messages, 16 authors, 2017-12-04

[PATCH v2 08/18] arm64: don't disable ADR_PREL_PG_HI21* with ARM64_ERRATUM_843419

From: Ard Biesheuvel <hidden>
Date: 2017-11-16 22:14:27
Also in: linux-kbuild, lkml

On 16 November 2017 at 21:37, Sami Tolvanen [off-list ref] wrote:
On Thu, Nov 16, 2017 at 04:34:03PM +0000, Ard Biesheuvel wrote:
quoted
You still have not explained to us how GOLD avoids the erratum.
Sorry, I didn't realize you were asking that. If gold spots erratum
sequences, looks like it creates stubs to break them up:

  https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/aarch64.cc#l8396

It also attempts to optimize the code by replacing adrps in these
sequences with adr where possible, but otherwise doesn't appear to
touch them:

  https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/aarch64.cc#l2053
OK, so my concern here is that this code probably only operates on
fully linked binaries, and not partially linked object files like
kernel modules. The same applies to ld.bfd, which is why we need to
use the large module instead of a code model that may emit adrp
instructions..

What is preventing us from using the large model with clang? I know it
uses movk/movz pairs rather than literals, but this shouldn't matter
for modules, given that we support static ELF relocations.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help