This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] MIPS: fix mips16 symbol identification
- From: Shun-Yen Lu <dark dot asparagus at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 18 Apr 2012 15:14:43 +0800
- Subject: [PATCH] MIPS: fix mips16 symbol identification
Hi,
A mips16 symbol may contains non-zero visibility bits, so original
implementation
cannot correctly identify mips16 internal/hidden/protected symbols.
The fix below uses ELF_ST_IS_MIPS16 macro to check mips16 symbol instead of
checking st_other directly.
Thanks.
Shun-Yen Lu
2012-04-18 Shun-Yen Lu <dark.asparagus@gmail.com>
gdb/
* mips-tdep.c (mips_elf_make_msymbol_special): Fix identification
of mips16 symbol.
===================================================================
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -268,7 +268,7 @@ mips_abi_regsize (struct gdbarch *gdbarch)
?static void
?mips_elf_make_msymbol_special (asymbol * sym, struct minimal_symbol *msym)
?{
-? if (((elf_symbol_type *) (sym))->internal_elf_sym.st_other == STO_MIPS16)
+? if (ELF_ST_IS_MIPS16(((elf_symbol_type *) (sym))->internal_elf_sym.st_other))
???? {
?????? MSYMBOL_TARGET_FLAG_1 (msym) = 1;
???? }