Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2013-06-07 02:09:07 +0400
committerMaciej W. Rozycki <macro@codesourcery.com>2013-06-07 02:09:07 +0400
commitfc316f3a8eb2045c1c8105ddcbd1275867d872a3 (patch)
treedc6efc4c012857e61646bc96828a70b766fe0df6 /include
parent8b7f83e68ff18aeec8b9a540b899445feec65371 (diff)
* mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting.
Diffstat (limited to 'include')
-rw-r--r--include/elf/ChangeLog4
-rw-r--r--include/elf/mips.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 9be3cff6c..dcbe68633 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-06 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting.
+
2013-05-30 Paul Brook <paul@codesourcery.com>
* mips.h (R_MIPS_EH): New.
diff --git a/include/elf/mips.h b/include/elf/mips.h
index b5f7e1a89..44d815e82 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