xtensa: use property tables for correct disassembly
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 24 May 2018 18:22:14 +0000 (11:22 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 4 Jun 2018 17:38:55 +0000 (10:38 -0700)
commit4b8e28c79356265b2c111e044142fb6d6d2db44e
tree91af77906ed4ca6606d9b44854cd5283e656a233
parent8255c61b8ad5ac933672d26e5c9454aaf09ccaeb
xtensa: use property tables for correct disassembly

xtensa disassembler does not use information from the .xt.prop sections
to switch between code/data disassembly in text sections. This may
result in incorrect disassembly when data is interpreted as code and
disassembler loses synchronization with instruction stream. Use .xt.prop
section information to correctly interpret code and data and synchronize
with instruction stream.

2018-06-04  Max Filippov  <jcmvbkbc@gmail.com>
bfd/
* elf32-xtensa.c (xtensa_read_table_entries): Make global.
(compute_fill_extra_space): Drop declaration. Rename function to
xtensa_compute_fill_extra_space.
(compute_ebb_actions, remove_dead_literal): Update references to
compute_fill_extra_space.

include/
* elf/xtensa.h (xtensa_read_table_entries)
(xtensa_compute_fill_extra_space): New declarations.

opcodes/
* xtensa-dis.c (bfd.h, elf/xtensa.h): New includes.
(dis_private): Add new fields for property section tracking.
(xtensa_coalesce_insn_tables, xtensa_find_table_entry)
(xtensa_instruction_fits): New functions.
(fetch_data): Bump minimal fetch size to 4.
(print_insn_xtensa): Make struct dis_private static.
Load and prepare property table on section change.
Don't disassemble literals. Don't disassemble instructions that
cross property table boundaries.
bfd/ChangeLog
bfd/elf32-xtensa.c
include/ChangeLog
include/elf/xtensa.h
opcodes/ChangeLog
opcodes/xtensa-dis.c
This page took 0.025667 seconds and 4 git commands to generate.