[Xtensa] fix segfault for non-ELF input to ld

Bob Wilson bwilson@tensilica.com
Wed Jul 18 22:06:00 GMT 2007


One of the uclibc makefiles runs "ld -b binary /dev/null" to check if a 
command-line option is supported.  This causes a segfault for Xtensa because it 
expects to see only ELF inputs.  I think it gets as far as it does only because 
of the special case for "binary" targets in bfd_arch_get_compatible (in 
archures.c).  I've committed this patch to avoid the segfault; it isn't clear to 
me that any more systematic checking for non-ELF files is necessary.

2007-07-18  Bob Wilson  <bob.wilson@acm.org>
	
	* elf32-xtensa.c (xtensa_callback_required_dependence): Ignore
	non-ELF sections.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfd-uclibc-hack.patch
Type: text/x-diff
Size: 769 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20070718/6d633a11/attachment.bin>


More information about the Binutils mailing list