diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2008-07-10 19:05:29 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2008-07-10 19:05:29 +0000 |
commit | 30c090907953c55bb80ec4af160054776d32303e (patch) | |
tree | b16f1fae33fd1f6a46e43a584a64e364853680ae /bfd/elfxx-mips.c | |
parent | e0a3ce09eda6da9d3242ec79da937b156bf593fd (diff) | |
download | gdb-30c090907953c55bb80ec4af160054776d32303e.zip gdb-30c090907953c55bb80ec4af160054776d32303e.tar.gz gdb-30c090907953c55bb80ec4af160054776d32303e.tar.bz2 |
include/elf/
* mips.h (ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): New macros.
bfd/
* elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16.
(mips_elf_calculate_relocation): Likewise.
(_bfd_mips_elf_add_symbol_hook): Likewise.
(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
opcodes/
* mips-dis.c (_print_insn_mips): Use ELF_ST_IS_MIPS16.
gas/
* config/tc-mips.c (mips16_mark_labels): Use ELF_ST_SET_MIPS16.
(mips_fix_adjustable): Likewise.
(mips_frob_file_after_relocs): Likewise.
gas/testsuite/
* gas/mips/mips16-vis-1.d, gas/mips/mips16-vis-1.s: New tests.
* gas/mips/mips.exp: Run them.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r-- | bfd/elfxx-mips.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 0839913..fabae69 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -1172,7 +1172,7 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h, } if (h->call_stub != NULL - && h->root.other == STO_MIPS16) + && ELF_ST_IS_MIPS16 (h->root.other)) { /* We don't need the call_stub; this is a 16 bit function, so calls from other 16 bit functions are OK. Clobber the size @@ -1184,7 +1184,7 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h, } if (h->call_fp_stub != NULL - && h->root.other == STO_MIPS16) + && ELF_ST_IS_MIPS16 (h->root.other)) { /* We don't need the call_stub; this is a 16 bit function, so calls from other 16 bit functions are OK. Clobber the size @@ -4182,7 +4182,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, } /* MIPS16 text labels should be treated as odd. */ - if (sym->st_other == STO_MIPS16) + if (ELF_ST_IS_MIPS16 (sym->st_other)) ++symbol; /* Record the name of this symbol, for our caller. */ @@ -4192,7 +4192,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, if (*namep == '\0') *namep = bfd_section_name (input_bfd, sec); - target_is_16_bit_code_p = (sym->st_other == STO_MIPS16); + target_is_16_bit_code_p = ELF_ST_IS_MIPS16 (sym->st_other); } else { @@ -4288,7 +4288,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, symbol = 0; } - target_is_16_bit_code_p = (h->root.other == STO_MIPS16); + target_is_16_bit_code_p = ELF_ST_IS_MIPS16 (h->root.other); } /* If this is a 32- or 64-bit call to a 16-bit function with a stub, we @@ -6121,7 +6121,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, /* If this is a mips16 text symbol, add 1 to the value to make it odd. This will cause something like .word SYM to come up with the right value when it is loaded into the PC. */ - if (sym->st_other == STO_MIPS16) + if (ELF_ST_IS_MIPS16 (sym->st_other)) ++*valp; return TRUE; @@ -6144,7 +6144,7 @@ _bfd_mips_elf_link_output_symbol_hook && strcmp (input_sec->name, ".scommon") == 0) sym->st_shndx = SHN_MIPS_SCOMMON; - if (sym->st_other == STO_MIPS16) + if (ELF_ST_IS_MIPS16 (sym->st_other)) sym->st_value &= ~1; return TRUE; @@ -8721,7 +8721,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, } /* If this is a mips16 symbol, force the value to be even. */ - if (sym->st_other == STO_MIPS16) + if (ELF_ST_IS_MIPS16 (sym->st_other)) sym->st_value &= ~1; return TRUE; @@ -8893,7 +8893,7 @@ _bfd_mips_vxworks_finish_dynamic_symbol (bfd *output_bfd, } /* If this is a mips16 symbol, force the value to be even. */ - if (sym->st_other == STO_MIPS16) + if (ELF_ST_IS_MIPS16 (sym->st_other)) sym->st_value &= ~1; return TRUE; |