diff options
author | Fangrui Song <i@maskray.me> | 2025-03-28 20:44:07 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-03-28 20:44:07 -0700 |
commit | ba2de8f22d0cac86d89c1806fb54ed3463349342 (patch) | |
tree | cd47ac9986ea3fc21c02264777ae96c514a5115e /llvm/lib/CodeGen | |
parent | 1d4801f22ab1fd6205b1cf625b690aefc554cd4c (diff) | |
download | llvm-ba2de8f22d0cac86d89c1806fb54ed3463349342.zip llvm-ba2de8f22d0cac86d89c1806fb54ed3463349342.tar.gz llvm-ba2de8f22d0cac86d89c1806fb54ed3463349342.tar.bz2 |
[ELF] Allow absolute relocation referencing symbol index 0 in PIC mode
The value of an absolute relocation, like R_RISCV_HI20 or R_PPC64_LO16,
with a symbol index of 0, the resulting value should be treated as
absolute and permitted in both -pie and -shared links.
This change also resolves an absolute relocation referencing an
undefined symbol in statically-linked executables.
PPC64 has unfortunate exceptions:
* R_PPC64_TOCBASE uses symbol index 0 but it should be treated as
referencing the linker-defined .TOC.
* R_PPC64_PCREL_OPT (https://reviews.llvm.org/D84360) could no longer
rely on `isAbsoluteValue` return false.
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions