[patch] ARM mapping symbols and disassembly

Paul Brook paul@codesourcery.com
Sat Oct 21 01:30:00 GMT 2006


objdump currently uses the type of the preceding symbol to determine whether 
it should disassemble code as Arm or Thumb. This has various failure modes, 
including functions that contain both Arm and Thumb code, and cases where the 
preceding symbol is not a function symbol. The latter is common in the 
binutils/gas testsuites. It currently works because gas gives these symbols 
the nonstandard STT_ARM_16BIT type. I have a followup patch to suppress this 
behavior.

The attached patch makes the disassembler look for mapping symbols to 
determine disassembly mode. Having the disassembler root through the symbol 
table like this is ugly, but I couldn't find a better solution.

Tested with cross to arm-none-eabi.
Ok?

Paul

2006-10-20  Paul Brook  <paul@codesourcery.com>

	binutils/
	* objdump.c (disassemble_section): Set info->symtab{,_size,_pos}.

	include/
	* dis-asm.h (disassemble_info): Add symtab, symtab_pos and
	symtab_size.

	opcodes/
	* arm-dis.c (last_is_thumb, last_mapping_sym, last_mapping_addr): New.
	(get_sym_code_type): New function.
	(print_insn): Search for mapping symbols.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.disas_mapping
Type: text/x-diff
Size: 5471 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20061021/bccad8d6/attachment.bin>


More information about the Binutils mailing list