Open
Description
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 for details.)
This reproducer 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.