diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 245267d7c..20ba2297e 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,8 @@ +2013-06-24 Maciej W. Rozycki + + * mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting. + (ELF_ST_SET_MIPS_PLT): Likewise. + 2013-06-19 Will Newton * aarch64.h: Remove R_AARCH64_IRELATIVE. diff --git a/include/elf/mips.h b/include/elf/mips.h index 44d815e82..f3be987a0 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,