Issue |
143023
|
Summary |
[lld][ELF] lld doesn't check RISC-V e_flags for ET_DYN inputs
|
Labels |
lld
|
Assignees |
|
Reporter |
mysterymath
|
RISC-V linkers check `e_flags` for ABI compatibility between input files. LLD seems to do this only for ET_REL (.o) files. GNU (BFD) ld also checks ET_DYN (.so) files.
This led to an issue in Fuchsia WRT llvm-ifs. (See the [corresponding Fuchsia issue](https://issues.fuchsia.dev/issues/422200989) for details.)
This [reproducer](https://issues.fuchsia.dev/action/issues/422200989/attachments/66423793?download=true) succeeds on LLD, but it produces the following on GNU LD:
```
% ./prebuilt/third_party/gcc/linux-x64/bin/riscv64-elf-ld.bfd -o foo foo.o libbar.so
./prebuilt/third_party/gcc/linux-x64/bin/riscv64-elf-ld.bfd: libbar.so: can't link soft-float modules with double-float modules
./prebuilt/third_party/gcc/linux-x64/bin/riscv64-elf-ld.bfd: failed to merge target specific data of file libbar.so
```
Originally filed by @frobtech downstream; adding for context/discussion.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs