This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
arm backend crash when handling incompatible input file
- From: Roland McGrath <mcgrathr at google dot com>
- To: binutils at sourceware dot org
- Date: Thu, 13 Dec 2012 16:06:28 -0800
- Subject: arm backend crash when handling incompatible input file
When the user makes the error of throwing an incompatible object (in my
case, and i386 ELF file) into an ARM ELF link, ld generates the
"architecture of input file is incompatible with arm output" error as it
should. But then it also crashes.
The call chain is:
main
lang_process
ldemul_after_allocation
gldarmelf_after_allocation
elf32_arm_size_stubs
cortex_a8_erratum_scan
It crashes because it's using elf32_arm_section_data on an input bfd that
is not arm-flavored and so doesn't use that data structure. Clearly it
should be either bailing out entirely or skipping the nonmatching input bfd
before it gets to this point. But it's not entirely clear to me where that
check should be made, nor what the proper method is to check for such
mismatch.
Suggestions?
Thanks,
Roland