Open eastB233 opened 3 months ago
$ clang test.o -fPIC -shared -o libtest.so
$ objdump -DR libtest.so
...
0000000000000518 <gf_vect_mad_neon>:
518: 58000080 ldr x0, 528 <gf_vect_mad_neon+0x10>
51c: 3dc00001 ldr q1, [x0]
520: d65f03c0 ret
524: 00000000 udf #0
528: 00020018 .inst 0x00020018 ; undefined
528: R_AARCH64_RELATIVE *ABS*+0x20018
52c: 00000000 udf #0
...
It seems ld will transform R_AARCH64_ABS64
to R_AARCH64_RELATIVE
in some way.
And I find https://reviews.llvm.org/D17265 may do the same thing.
My test case is
It is okay when I use ld but fails with lld (I use LLVM 17)