[webkit-changes] [WebKit/WebKit] 3127e0: [JSC][RISCV64] Use GOT for non-local symbols in ba...

q66 noreply at github.com
Sat Oct 8 06:11:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3127e0a5094b9cff04a6e37f123122a1e5dec036
      https://github.com/WebKit/WebKit/commit/3127e0a5094b9cff04a6e37f123122a1e5dec036
  Author: Daniel Kolesa <dkolesa at igalia.com>
  Date:   2022-10-08 (Sat, 08 Oct 2022)

  Changed paths:
    M Source/JavaScriptCore/offlineasm/riscv64.rb

  Log Message:
  -----------
  [JSC][RISCV64] Use GOT for non-local symbols in backend

https://bugs.webkit.org/show_bug.cgi?id=246157

Reviewed by Žan Doberšek.

The lla and la pseudo-instructions are identical when non-PIC,
but in PIC lla enforces pc-relative addressing unconditionally.
This works with bfd for some reason (likely silently rewriting it
or emitting textrels) but with lld it fails to build with messages
like:

ld: error: relocation R_RISCV_PCREL_HI20 cannot be used against symbol 'g_opcodeMap'; recompile with -fPIC

This is because g_opcodeMap (and others) are global, thus a GOT
lookup is necessary (as there is no relative address we can load).

Canonical link: https://commits.webkit.org/255311@main




More information about the webkit-changes mailing list