From 48e65d55bbea474e566dfc921bdf18e215a464ff Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Thu, 6 Jun 2013 22:09:07 +0000 Subject: [PATCH] * mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting. --- include/elf/ChangeLog | 4 ++++ include/elf/mips.h | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 9be3cff6c91..dcbe68633a2 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,7 @@ +2013-06-06 Maciej W. Rozycki + + * mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting. + 2013-05-30 Paul Brook * mips.h (R_MIPS_EH): New. diff --git a/include/elf/mips.h b/include/elf/mips.h index b5f7e1a898c..44d815e8272 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 -- 2.30.2