[all-commits] [llvm/llvm-project] a14cca: [ELF] Support 128-bit bitmask in oneof(RelExpr)
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Oct 25 13:05:32 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a14ccaf5098ae13da22495444aa3b88097387168
https://github.com/llvm/llvm-project/commit/a14ccaf5098ae13da22495444aa3b88097387168
Author: Fangrui Song <i at maskray.me>
Date: 2021-10-25 (Mon, 25 Oct 2021)
Changed paths:
M lld/ELF/Relocations.cpp
Log Message:
-----------
[ELF] Support 128-bit bitmask in oneof(RelExpr)
Taken from Chih-Mao Chen's D100835.
RelExpr has 64 bits now and needs the extension to support new members
(`R_PLT_GOTPLT` for `R_X86_64_PLTOFF64` support).
Note: RelExpr needs to have at least a member >=64 to prevent
-Wtautological-constant-out-of-range-compare for `if (expr >= 64)`.
Reviewed By: arichardson, peter.smith
Differential Revision: https://reviews.llvm.org/D112385
Commit: ca8105b76c1e3790e20fdd460cf1fb66f864020f
https://github.com/llvm/llvm-project/commit/ca8105b76c1e3790e20fdd460cf1fb66f864020f
Author: Fangrui Song <i at maskray.me>
Date: 2021-10-25 (Mon, 25 Oct 2021)
Changed paths:
M lld/ELF/Arch/X86_64.cpp
M lld/ELF/InputSection.cpp
M lld/ELF/Relocations.cpp
M lld/ELF/Relocations.h
A lld/test/ELF/x86-64-reloc-pltoff64.s
Log Message:
-----------
[ELF][X86] Support R_X86_64_PLTOFF64
For a function call (using the default `-fplt`), GCC `-mcmodel=large` generates an assembly modifier which
leads to an R_X86_64_PLTOFF64 relocation. In real world,
http://git.ageinghacker.net/jitter (used by GNU poke) uses `-mcmodel=large`.
R_X86_64_PLTOFF64's formula is (if preemptible) `L - GOT + A` or (if non-preemptible) `S - GOT + A`
where `GOT` is (confusingly) the address of `.got.plt`
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D112386
Compare: https://github.com/llvm/llvm-project/compare/593814a10cb4...ca8105b76c1e
More information about the All-commits
mailing list