Open LemonBoy opened 4 years ago
If I'm reading https://github.com/llvm/llvm-project/issues/163#issuecomment-593586538 correctly, this should have been fixed since LLVM 11, but would be worthwhile (for someone who knows how to) to re-test for verification.
One more bug for our LLVM friends, this time the problem is inside the linker guts!
ASM file:
Linker script:
Linked using the following command line:
ld.lld-10 -T /tmp/script.ld /tmp/foo.o -o /tmp/foo
Version:1:10~++20200228052623+4c6e5899859-1~exp1~20200228163220.107
(from the LLVM's APT repo)The problem lies in how the physical address of the program headers is calculated, the value computed by
lld
is wildly wrong:On the other hand
gnu ld
produces the correct result: