ld.bfd used a R_RISCV_CALL to invoke sigprocmask previously, but this
has the unfortunate effect of sometimes using the PLT stub to permit
symbol resolution and sometimes branching to the local symbol
directly. Far calls and branches use R_RISCV_CALL_PLT which always
uses a PLT stub. lld reports an error when using R_RISCV_CALL in a
shared library, so this fixes the build with lld while also being more
correct.
Details
Details
- built world with lld
- ran tests from /usr/tests/lib/libc/setjmp
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
In this instance it's uses of R_RISCV_JAL/R_RISCV_BRANCH rather than R_RISCV_CALL, but they all behave the same in BFD (plus their compressed variants, and interestingly also R_RISCV_PCREL_HI20). LLD will always error if you use these on undefined/preemptible symbols, much like any other architecture, whereas BFD does the weird resolution as John describes.