https://sourceware.org/bugzilla/show_bug.cgi?id=30198
Bug ID: 30198 Summary: Assertion fail when linking elf and coff together Product: binutils Version: 2.40 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: medhefgo at web dot de Target Milestone: --- I know the following makes no sense to do, but it should error out instead of crashing. $ uname -a Linux debian-amd64 6.1.14-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 25 Feb 2023 11:02:38 +0000 x86_64 GNU/Linux $ cat test1.c void a(void) { __builtin_printf("a"); } $ cat test2.c void a(void); int main(int argc, char *argv[]) { a(); } $ clang -target x86_64-windows-gnu -c test1.c -o test1.o $ clang -o test test1.o test2.c /usr/bin/ld: warning: test1.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld: BFD (GNU Binutils for Debian) 2.40 assertion fail ../../bfd/reloc.c:8632 test1.o:test1.c:(.pdata+0x0): dangerous relocation: clang: error: unable to execute command: Segmentation fault (core dumped) clang: error: linker command failed due to signal (use -v to see invocation) $ clang -fuse-ld=lld -o test test1.o test2.c ld.lld: error: test1.o: unknown file type clang: error: linker command failed with exit code 1 (use -v to see invocation) -- You are receiving this mail because: You are on the CC list for the bug.