summaryrefslogtreecommitdiff
path: root/include/elf
diff options
context:
space:
mode:
Diffstat (limited to 'include/elf')
-rw-r--r--include/elf/ChangeLog5
-rw-r--r--include/elf/mips.h10
2 files changed, 13 insertions, 2 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 245267d7cd2..20ba2297ed6 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-24 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting.
+ (ELF_ST_SET_MIPS_PLT): Likewise.
+
2013-06-19 Will Newton <will.newton@linaro.org>
* aarch64.h: Remove R_AARCH64_IRELATIVE.
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 44d815e8272..f3be987a0ab 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -803,8 +803,14 @@ extern void bfd_mips_elf32_swap_reginfo_out
PLT entries and traditional MIPS lazy binding stubs. We mark the former
with STO_MIPS_PLT to distinguish them from the latter. */
#define STO_MIPS_PLT 0x8
-#define ELF_ST_IS_MIPS_PLT(other) (((other) & STO_MIPS_FLAGS) == STO_MIPS_PLT)
-#define ELF_ST_SET_MIPS_PLT(other) (((other) & ~STO_MIPS_FLAGS) | STO_MIPS_PLT)
+#define ELF_ST_IS_MIPS_PLT(other) \
+ ((ELF_ST_IS_MIPS16 (other) \
+ ? ((other) & (~STO_MIPS16 & STO_MIPS_FLAGS)) \
+ : ((other) & STO_MIPS_FLAGS)) == STO_MIPS_PLT)
+#define ELF_ST_SET_MIPS_PLT(other) \
+ ((ELF_ST_IS_MIPS16 (other) \
+ ? ((other) & (STO_MIPS16 | ~STO_MIPS_FLAGS)) \
+ : ((other) & ~STO_MIPS_FLAGS)) | STO_MIPS_PLT)
/* This value is used to mark PIC functions in an object that mixes
PIC and non-PIC. Note that this bit overlaps with STO_MIPS16,