This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;
???? }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]