$ cat crash.s main: nop rjmp main ret rjmp main $ avr-gcc -mmcu=atmega8 -Wl,--relax crash.s collect2: ld terminated with signal 11 [Segmentation fault], core dumped
This came up in some actual code and I condensed it to the minimal example above. The nop can be any instruction. The two references to main seem necessary, and the ret is key. I'm thinking that the linker must be examining the instructions to find routines or something. Apologies if this has already been reported.