The i686-pc-linux-gnu build of the assembler from binutils 2.16 crx-port creates a segmentation fault with the assembly file below. This time the problem is located in libiberty/xexit.c where the function pointer named _xexit_cleanup in line 44 is NOT initialized to NULL. The following patch for xexit.c (Revision 1.7) fixes this problem: -------------------------------------------- patch for libiberty/xexit.c *** xexit.c 2005-07-14 10:19:14.399002000 +0200 --- xexit_fixed.c 2005-07-14 10:37:09.358001000 +0200 *************** *** 41,47 **** /* This variable is set by xatexit if it is called. This way, xmalloc doesn't drag xatexit into the link. */ ! void (*_xexit_cleanup) (void); void xexit (int code) --- 41,47 ---- /* This variable is set by xatexit if it is called. This way, xmalloc doesn't drag xatexit into the link. */ ! void (*_xexit_cleanup) (void) = NULL; void xexit (int code) --------------------------------------------- libiberty-xexit-segfault.s .size __ZNK1S1fElllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllc, .-__ZNK1S1fElllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllc .section .text .align 4 .globl _main .type _main, @function _main: bal ra, __ZNK1S1fElllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllc .size _main, .-_main
Your patch can not be correct, because global variables are implicitly initialized to NULL. There must be something else going on. Can you show precisely how you configured the binutils? Is this unmodified FSF binutils 2.16 sources?
I see now that this was duplicated as PR 1069, and fixed there. *** This bug has been marked as a duplicate of 1069 ***