Hi,
Please could you try out the uploaded patch ?
It seems that the bug is in the elf32_avr_check_relocs() function, but since this function does not actually do anything there is no reason to actually keep it in the sources.
Cheers
Nick

Hi,
> I applied it to the 2.18 sources, the problem still persists.
My bad - I was using the current mainline binutils sources. The old 2.18 sources have two places that need to be fixed, so please try out the newly uploaded "extra" patch. (Despite its name, this patch should be applied instead of the delete elf32_avr_check_relocs patch).
Cheers
Nick

(In reply to comment #0)
> Created attachment 5085[details]
> ELF file which causes avr-ld to crash
>
> The attached ELF file causes avr-ld to crash:
>
> $ avr-ld govrout.o
> Segmentation fault
Typically, avr-ld is not called directly, but through the driver (avr-gcc). Plus you must also specify the device on the linker command line: -mmcu=<device>.
Do you still get a crash when you do this?
Eric Weddington
Atmel

Hi Georg-Johann,
> Is this only a fix for HEAD or will it be backported to 2.22, too?
It was only checked in to HEAD, although the patch will work with the 2.22 sources as well. I have now checked it in to the 2.22 branch. so if there is a 2.22 point release then the patch will be included in that.
Cheers
Nick

(In reply to comment #16)
> Hi Georg-Johann,
>
> > Is this only a fix for HEAD or will it be backported to 2.22, too?
>
> It was only checked in to HEAD, although the patch will work with the 2.22
> sources as well. I have now checked it in to the 2.22 branch. so if there is a
> 2.22 point release then the patch will be included in that.
Thanks for taking care of the matter and for the quick response.
If there is the decision to have no more 2.22 release and thus your work won't be integrated in any 2.22 release, then the release notes in
http://sourceware.org/binutils/
should mention that avr-binutils are broken for target avr and unusable.
Even if avr is no "important" target it would be great to have a working 2.22 avr-binutils and not a version that's completely broken...