[lld] [lld][ELF] Allow Arm PC-relative relocations in pic or shared library (PR #77304)
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 10:36:01 PST 2024
jrtc27 wrote:
> > What "BSD" problem is this? (Semi-interested if it's FreeBSD)
>
> Looks like it is FreeBSD. It was a report that the change to make ADR emit a relocation had broken a BSD program [#73834 (comment)](https://github.com/llvm/llvm-project/pull/73834#issuecomment-1867006872) (link refers to https://reviews.freebsd.org/D2035)
>
> I think the problem will still occur (if this code can be put in a shared object) as the adr target is `.global _C_LABEL(cachebailout)`
>
> I'm hoping that .global can be replaced with `.hidden` or `.protected` so cachebailout can be visible inside the program, but not preemptible.
That's code in the kernel, so not preemptible, though if the code is still wrong for other reasons it's not a problem to fix it to support newer toolchains, there's normally some amount of that across the tree on each LLVM bump.
(And to answer a question I see in there: FreeBSD uses its vendored Clang+LLD by default, but can be configured to use an external toolchain, whether LLVM, GNU or, in theory (but not really tested) a mix)
https://github.com/llvm/llvm-project/pull/77304
More information about the llvm-commits
mailing list