From cdb3d5f90252e5ba6f88269224eb4373e6a453a7 Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Mon, 31 Aug 1998 16:06:30 +0000 Subject: [PATCH] * config/tc-arm.c: Remove OBJ_ELF definitions for S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. Only use arm_adjust_symtab for OBJ_COFF. (armelf_adjust_symtab): New Routine. * config/tc-arm.h: Define obj_adjust_symtab to armelf_adjust_symtab for OBJ_ELF. --- gas/ChangeLog | 9 +++++++++ gas/config/tc-arm.c | 35 ++++++++++++++++++++++++++++++----- gas/config/tc-arm.h | 7 ++++++- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 4e881ccec91..1a53773be13 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +Mon Aug 31 10:58:06 1998 Catherine Moore + + * config/tc-arm.c: Remove OBJ_ELF definitions for + S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. Only + use arm_adjust_symtab for OBJ_COFF. + (armelf_adjust_symtab): New Routine. + * config/tc-arm.h: Define obj_adjust_symtab to + armelf_adjust_symtab for OBJ_ELF. + Sat Aug 29 22:18:51 1998 Richard Henderson * configure.in: Make all i386-elf targets use bfd_gas. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index a0b6f0abbbb..1b345bd8111 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -6310,13 +6310,13 @@ arm_frob_label (sym) ARM ones. */ #ifdef OBJ_ELF -#define S_GET_STORAGE_CLASS(S) (elf_symbol ((S)->bsym)->internal_elf_sym.st_other) -#define S_SET_STORAGE_CLASS(S,V) (elf_symbol ((S)->bsym)->internal_elf_sym.st_other = (V)) +#define S_GET_STORAGE_CLASS(S) (elf_symbol ((S)->bsym)->internal_elf_sym.st_info) +#define S_SET_STORAGE_CLASS(S,V) (elf_symbol ((S)->bsym)->internal_elf_sym.st_info = (V)) #endif +#ifdef OBJ_COFF void arm_adjust_symtab () { -#if defined OBJ_COFF || defined OBJ_ELF symbolS * sym; for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym)) @@ -6329,6 +6329,7 @@ arm_adjust_symtab () if ( S_GET_STORAGE_CLASS (sym) == C_STAT || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */ S_SET_STORAGE_CLASS (sym, C_THUMBSTATFUNC); + else if (S_GET_STORAGE_CLASS (sym) == C_EXT) S_SET_STORAGE_CLASS (sym, C_THUMBEXTFUNC); else @@ -6350,14 +6351,36 @@ arm_adjust_symtab () } } -#ifdef OBJ_COFF if (ARM_IS_INTERWORK (sym)) coffsymbol(sym->bsym)->native->u.syment.n_flags = 0xFF; -#endif } +} #endif +#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); + } + + } + } } +#endif + #ifdef OBJ_ELF void armelf_frob_symbol (symp, puntp) @@ -6367,6 +6390,7 @@ armelf_frob_symbol (symp, puntp) { elf_frob_symbol (symp, puntp); +/* if (S_IS_EXTERNAL (symp)) S_SET_STORAGE_CLASS(symp, C_EXT); @@ -6378,6 +6402,7 @@ armelf_frob_symbol (symp, puntp) else S_SET_STORAGE_CLASS (symp, C_STAT); } +*/ } #endif int diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index e382662ca02..65024a579b6 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -150,8 +150,13 @@ char *arm_canonicalize_symbol_name PARAMS ((char *)); #endif /* Finish processing the entire symbol table: */ -#define tc_adjust_symtab() arm_adjust_symtab () +#ifdef OBJ_ELF +#define obj_adjust_symtab() armelf_adjust_symtab () +extern void armelf_adjust_symtab PARAMS ((void)); +#else +#define obj_adjust_symtab() arm_adjust_symtab () extern void arm_adjust_symtab PARAMS ((void)); +#endif #if 0 #define tc_crawl_symbol_chain(a) {;} /* not used */ -- 2.30.2