mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-19 07:46:49 +00:00

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.