forked from Imagelibrary/binutils-gdb
* dbxread.c (MSYMBOL_SIZE): New macro.
(end_psymtab): Use MSYMBOL_SIZE to extract size from minimal symbol. * elfread.c (elf_symtab_read): If ELF symbol is "special", such as a MIPS16 function, mark minimal symbol as special too. * mips-tdep.c (pc_is_mips16): New function to check whether a function is MIPS16 by looking at the minimal symbol. Use pc_is_mips16 throughout instead of IS_MIPS16_ADDR macro. * config/mips/tm-mips.h (SYMBOL_IS_SPECIAL, MAKE_MSYMBOL_SPECIAL, MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): New functions for setting/testing "special" MIPS16 bit in ELF and minimal symbols. * mdebugread.c (parse_partial_symbols): Don't construct a partial symbol table for a file that already has one. start-sanitize-tx19 * configure.tgt: Support TX19. * config/mips/tm-tx19.h, config/mips/tm-tx19l.h, config/mips/tx19.mt, config/mips/tx19l.mt: New files for TX19. end-sanitize-tx19
This commit is contained in:
@@ -543,3 +543,27 @@ typedef unsigned long t_inst; /* Integer big enough to hold an instruction */
|
||||
#define UNMAKE_MIPS16_ADDR(addr) ((addr) & ~1)
|
||||
|
||||
#endif /* TM_MIPS_H */
|
||||
|
||||
/* Macros for setting and testing a bit in a minimal symbol that
|
||||
marks it as 16-bit function. The MSB of the minimal symbol's
|
||||
"info" field is used for this purpose. This field is already
|
||||
being used to store the symbol size, so the assumption is
|
||||
that the symbol size cannot exceed 2^31.
|
||||
|
||||
SYMBOL_IS_SPECIAL tests whether an ELF symbol is "special", i.e. refers
|
||||
to a 16-bit function
|
||||
MAKE_MSYMBOL_SPECIAL sets a "special" bit in a minimal symbol to mark it
|
||||
as a 16-bit function
|
||||
MSYMBOL_IS_SPECIAL tests the "special" bit in a minimal symbol
|
||||
MSYMBOL_SIZE returns the size of the minimal symbol, i.e.
|
||||
the "info" field with the "special" bit masked out
|
||||
*/
|
||||
|
||||
#define SYMBOL_IS_SPECIAL(sym) \
|
||||
(((elf_symbol_type *) sym) -> internal_elf_sym.st_other == STO_MIPS16)
|
||||
#define MAKE_MSYMBOL_SPECIAL(msym) \
|
||||
MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym)) | 0x80000000)
|
||||
#define MSYMBOL_IS_SPECIAL(msym) \
|
||||
(((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
|
||||
#define MSYMBOL_SIZE(msym) \
|
||||
((long) MSYMBOL_INFO (msym) & 0x7fffffff)
|
||||
|
||||
Reference in New Issue
Block a user