aboutsummaryrefslogtreecommitdiff
path: root/include/elf/mips.h
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-06-06 22:09:07 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-06-06 22:09:07 +0000
commit48e65d55bbea474e566dfc921bdf18e215a464ff (patch)
tree740103fdd838f5bdf2e9698fc4ef1145b109c6e7 /include/elf/mips.h
parentc6cf1712fb960f2db2dba0a4033f3b80c28ef35d (diff)
downloadgdb-48e65d55bbea474e566dfc921bdf18e215a464ff.zip
gdb-48e65d55bbea474e566dfc921bdf18e215a464ff.tar.gz
gdb-48e65d55bbea474e566dfc921bdf18e215a464ff.tar.bz2
* mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting.
Diffstat (limited to 'include/elf/mips.h')
-rw-r--r--include/elf/mips.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/elf/mips.h b/include/elf/mips.h
index b5f7e1a..44d815e 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -811,7 +811,10 @@ extern void bfd_mips_elf32_swap_reginfo_out
although MIPS16 symbols are never considered to be MIPS_PIC. */
#define STO_MIPS_PIC 0x20
#define ELF_ST_IS_MIPS_PIC(other) (((other) & STO_MIPS_FLAGS) == STO_MIPS_PIC)
-#define ELF_ST_SET_MIPS_PIC(other) (((other) & ~STO_MIPS_FLAGS) | STO_MIPS_PIC)
+#define ELF_ST_SET_MIPS_PIC(other) \
+ ((ELF_ST_IS_MIPS16 (other) \
+ ? ((other) & ~(STO_MIPS16 | STO_MIPS_FLAGS)) \
+ : ((other) & ~STO_MIPS_FLAGS)) | STO_MIPS_PIC)
/* This value is used for a mips16 .text symbol. */
#define STO_MIPS16 0xf0