From a03925a2fc8424c763a3a173187bd6b5360612db Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Sat, 5 Sep 1998 02:58:46 +0000 Subject: [PATCH] Fixed generation of thumb function symbols. --- gas/ChangeLog | 5 +++++ gas/config/tc-arm.c | 50 +++++++++++++++------------------------------ gas/config/tc-arm.h | 4 ++-- 3 files changed, 23 insertions(+), 36 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 9c692291b47..a3f66eb99f8 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Fri Sep 4 17:07:14 1998 Nick Clifton + + * config/tc-arm.h (obj_adjust_symtab): Fixed typo. + * config/tc-arm.c (armelf_adjust_symtab): Reformatted. + Fri Sep 4 13:57:43 1998 Jakub Jelinek * config/tc-sparc.c (in_signed_range): Sign extend 32-bit words diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 1b345bd8111..693a21f3c61 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -6355,56 +6355,38 @@ arm_adjust_symtab () coffsymbol(sym->bsym)->native->u.syment.n_flags = 0xFF; } } -#endif +#endif /* OBJ_COFF */ #ifdef OBJ_ELF void armelf_adjust_symtab () { symbolS * sym; - elf_symbol_type *elf_sym; - char bind; for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym)) { - if (ARM_IS_THUMB (sym)) - { - if (THUMB_IS_FUNC (sym)) - { - elf_sym = elf_symbol(sym->bsym); - bind = ELF_ST_BIND(elf_sym); - elf_sym->internal_elf_sym.st_info = ELF_ST_INFO(bind, STT_ARM_TFUNC); - } + if (ARM_IS_THUMB (sym) && (THUMB_IS_FUNC (sym))) + { + elf_symbol_type * elf_sym; + unsigned char bind; - } - } + elf_sym = elf_symbol (sym->bsym); + bind = ELF_ST_BIND (elf_sym->internal_elf_sym.st_info); + + elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_TFUNC); + } + } } -#endif - -#ifdef OBJ_ELF void armelf_frob_symbol (symp, puntp) - symbolS *symp; - int *puntp; - + symbolS * symp; + int * puntp; { elf_frob_symbol (symp, puntp); +} + +#endif /* OBJ_ELF */ -/* - if (S_IS_EXTERNAL (symp)) - S_SET_STORAGE_CLASS(symp, C_EXT); - - if (S_GET_STORAGE_CLASS (symp) == C_NULL) - { - if (S_GET_SEGMENT (symp) == text_section - && symp != seg_info (text_section)->sym) - S_SET_STORAGE_CLASS (symp, C_LABEL); - else - S_SET_STORAGE_CLASS (symp, C_STAT); - } -*/ -} -#endif int arm_data_in_code () { diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index 65024a579b6..a493052ca82 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -151,10 +151,10 @@ char *arm_canonicalize_symbol_name PARAMS ((char *)); /* Finish processing the entire symbol table: */ #ifdef OBJ_ELF -#define obj_adjust_symtab() armelf_adjust_symtab () +#define obj_adjust_symtab armelf_adjust_symtab extern void armelf_adjust_symtab PARAMS ((void)); #else -#define obj_adjust_symtab() arm_adjust_symtab () +#define obj_adjust_symtab arm_adjust_symtab extern void arm_adjust_symtab PARAMS ((void)); #endif -- 2.30.2