diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2018-05-24 11:22:14 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2018-06-04 10:38:55 -0700 |
commit | 4b8e28c79356265b2c111e044142fb6d6d2db44e (patch) | |
tree | 91af77906ed4ca6606d9b44854cd5283e656a233 /include | |
parent | 8255c61b8ad5ac933672d26e5c9454aaf09ccaeb (diff) | |
download | gdb-4b8e28c79356265b2c111e044142fb6d6d2db44e.zip gdb-4b8e28c79356265b2c111e044142fb6d6d2db44e.tar.gz gdb-4b8e28c79356265b2c111e044142fb6d6d2db44e.tar.bz2 |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/elf/xtensa.h | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 76a312a..7d32268 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2018-06-04 Max Filippov <jcmvbkbc@gmail.com> + + * elf/xtensa.h (xtensa_read_table_entries) + (xtensa_compute_fill_extra_space): New declarations. + 2018-06-04 H.J. Lu <hongjiu.lu@intel.com> * diagnostics.h (DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION): Always diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h index 6278e21..632d9e0 100644 --- a/include/elf/xtensa.h +++ b/include/elf/xtensa.h @@ -210,6 +210,14 @@ typedef struct property_table_entry_t #define XTENSA_PROP_INSN_ABSLIT 0x00020000 extern asection *xtensa_make_property_section (asection *, const char *); +extern int +xtensa_read_table_entries (bfd *abfd, + asection *section, + property_table_entry **table_p, + const char *sec_name, + bfd_boolean output_addr); +extern int +xtensa_compute_fill_extra_space (property_table_entry *entry); #ifdef __cplusplus } |