From 2f0ca46a499086b1c438f5b1768f383fa60351e2 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 27 Jan 2000 20:05:32 +0000 Subject: Apply Thoams de Lellis's patch to fic disassembly of Thumb instructions when bounded by non-function labels. --- gas/ChangeLog | 7 +++++++ gas/config/tc-arm.c | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 9ec7fa7..324a2e6 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2000-01-27 Thomas de Lellis + + * config/tc-arm.c (armadjust_symtab): If the assembler is in + Thumb mode but the label seen was not declared as '.thumb_func' + then set the ST_INFO type to STT_ARM_16BIT mode. This allows + correct disassembly of Thumb code bounded by non function labels. + 2000-01-27 Alan Modra * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 19ead2e..31ab321 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -6888,12 +6888,14 @@ arm_adjust_symtab () { if (ARM_IS_THUMB (sym)) { + elf_sym = elf_symbol (symbol_get_bfdsym (sym)); + bind = ELF_ST_BIND (elf_sym); + + /* If it's a .thumb_func, declare it as so, else tag label as .code 16. */ if (THUMB_IS_FUNC (sym)) - { - elf_sym = elf_symbol (symbol_get_bfdsym (sym)); - bind = ELF_ST_BIND (elf_sym); - elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_TFUNC); - } + elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_TFUNC); + else + elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_16BIT); } } #endif -- cgit v1.1