Windres in documentation has described that it supports only COFF and RES binary formats. Which is correct as the Windows resources are stored and used only in Windows COFF formats. But windres --help announces that it supports also lot of other non-PE targets, including ELF target. Trying to use use ELF target cause fatal error: $ x86_64-w64-mingw32-windres --target="elf64-x86-64" -i test.rc -o test.o x86_64-w64-mingw32-windres: can't get BFD_RELOC_RVA relocation type: cause of error unknown I think that this is a bug, windres should not accounce in --help and also should not accept any non-COFF target. Also it should not announce or accept PE/COFF target with MZ/PE executable header (EXE/DLL) as it cannot generate resource-only DLL file. Windres can generate only COFF object file which is without MZ/PE header. This issue was described in gcc bugzilla comment: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108866#c7