aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-02-18 23:18:16 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-02-18 23:18:16 +0000
commite8faf7d129cba28000ed252cc078b6c65783447f (patch)
tree3f690e5329147f42d18a3533b457065e7e75aa82 /bfd/elfxx-mips.c
parentc164a95dfa77b1a661273e85550e18b3ed5ea3db (diff)
downloadgdb-e8faf7d129cba28000ed252cc078b6c65783447f.zip
gdb-e8faf7d129cba28000ed252cc078b6c65783447f.tar.gz
gdb-e8faf7d129cba28000ed252cc078b6c65783447f.tar.bz2
* elfxx-mips.c (MICROMIPS_P): New macro.
(_bfd_mips_elf_symbol_processing): Use it.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 5a4e237..74a9a51 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -737,6 +737,10 @@ static bfd *reldyn_sorting_bfd;
/* Nonzero if ABFD is using NewABI conventions. */
#define NEWABI_P(abfd) (ABI_N32_P (abfd) || ABI_64_P (abfd))
+/* Nonzero if ABFD has microMIPS code. */
+#define MICROMIPS_P(abfd) \
+ ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH_ASE_MICROMIPS) != 0)
+
/* The IRIX compatibility level we are striving for. */
#define IRIX_COMPAT(abfd) \
(get_elf_backend_data (abfd)->elf_backend_mips_irix_compat (abfd))
@@ -6423,7 +6427,7 @@ _bfd_mips_elf_symbol_processing (bfd *abfd, asymbol *asym)
&& (asym->value & 1) != 0)
{
asym->value--;
- if (elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH_ASE_MICROMIPS)
+ if (MICROMIPS_P (abfd))
elfsym->internal_elf_sym.st_other
= ELF_ST_SET_MICROMIPS (elfsym->internal_elf_sym.st_other);
else