[lld] [lld][ELF] Allow Arm PC-relative relocations in pic or shared library (PR #77304)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 11:24:35 PST 2024


================
@@ -1,6 +1,8 @@
 // REQUIRES: arm
 // RUN: llvm-mc --triple=armv7a-none-eabi --arm-add-build-attributes -filetype=obj -o %t.o %s
 // RUN: ld.lld %t.o -o %t
+/// R_ARM_ALU_PC_G0 referencing a non-preemptible symbol can be used in PIC links.
+// RUN: ld.lld %t.o --shared -o %t.so
----------------
MaskRay wrote:

If we don't use the output, the convention is `/dev/null`.

Sometimes inspecting the output is useful (https://maskray.me/blog/2021-08-08-toolchain-testing#the-test-checks-too-little), but this simple change may not be worth the trouble.

https://github.com/llvm/llvm-project/pull/77304


More information about the llvm-commits mailing list