./gas/config/tc-sparc.h contains > #ifdef TE_FreeBSD > #define ELF_TARGET_FORMAT "elf32-sparc-freebsd" > #define ELF64_TARGET_FORMAT "elf64-sparc-freebsd" > #endif But this is the only mention of "elf32-sparc-freebsd" in the entire tree. Whereas ./bfd/elf64-sparc.c contains special handling that defines "elf64-sparc-freebsd", there appears to be no similar handling in "bfd/elf32-sparc.c". The net result is that invoking "as -32" yields > Fatal error: selected target format 'elf32-sparc-freebsd' unknown "objdump -H" lists many supported targets, but elf32-sparc-freebsd is not among them. This is OK -- I do not think anybody seriously attempts to build 32-bit ELFs on FreeBSD on sparc (except by accident, as in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55308 which brought this to my attention), so I am not sure if the #define of "ELF_TARGET_FORMAT" should be removed or if the current behavior is intentional, in which case, can I please have a better error message? Thanks! --nwf;
CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2013-03-26 13:49:12 Modified files: gas : ChangeLog gas/config : tc-sparc.h Log message: PR gas/15178 * config/tc-sparc.h (ELF_TARGET_FORMAT): Set to elf32-sparc for FreeBSD targets. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.4955&r2=1.4956 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-sparc.h.diff?cvsroot=src&r1=1.31&r2=1.32
Hi, Thanks for the bug report. I have changed the 32bit ELF target for FreeBSD Sparc configurations of the assembler to be plain old "elf32-sparc", which I think resolves the problem. Cheers Nick