+Mon Aug 31 10:58:06 1998 Catherine Moore <clm@cygnus.com>
+
+ * 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 <rth@cygnus.com>
* configure.in: Make all i386-elf targets use bfd_gas.
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))
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
}
}
-#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)
{
elf_frob_symbol (symp, puntp);
+/*
if (S_IS_EXTERNAL (symp))
S_SET_STORAGE_CLASS(symp, C_EXT);
else
S_SET_STORAGE_CLASS (symp, C_STAT);
}
+*/
}
#endif
int
#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 */