aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-03-18 19:15:24 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2002-03-18 19:15:24 +0000
commitc066429ee425b13780ac3e41bc6173687b46689e (patch)
tree41c66b45a005f0291ed741d1d6d4fd45eed8dea2
parent07e2e444ff04137a6a23cc646d1f98f2131c7c79 (diff)
downloadgcc-c066429ee425b13780ac3e41bc6173687b46689e.zip
gcc-c066429ee425b13780ac3e41bc6173687b46689e.tar.gz
gcc-c066429ee425b13780ac3e41bc6173687b46689e.tar.bz2
mips.h (ENCODE_SECTION_INFO): Don't use %gprel for symbols that are going to be placed in linkonce sections.
* config/mips/mips.h (ENCODE_SECTION_INFO) [TARGET_MIPS16]: Don't use %gprel for symbols that are going to be placed in linkonce sections. From-SVN: r50986
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/mips/mips.h6
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 429a2ff..7bbb1b0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2002-03-18 Alexandre Oliva <aoliva@redhat.com>
+ * config/mips/mips.h (ENCODE_SECTION_INFO) [TARGET_MIPS16]: Don't
+ use %gprel for symbols that are going to be placed in linkonce
+ sections.
+
* config/mips/mips.h (ELIMINABLE_REGS): Can't eliminate
RETURN_ADDRESS_POINTER_REGNUM to $ra.
(CAN_ELIMINATE): Only eliminate it to $sp if a frame pointer is
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index bc09632..536ef51 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -3407,7 +3407,11 @@ do \
specific sections, except for .sdata and .sbss which are \
handled above. */ \
else if (TARGET_GP_OPT && TREE_CODE (DECL) == VAR_DECL \
- && DECL_SECTION_NAME (DECL) == NULL_TREE) \
+ && DECL_SECTION_NAME (DECL) == NULL_TREE \
+ && ! (TARGET_MIPS16 && TREE_PUBLIC (DECL) \
+ && (DECL_COMMON (DECL) \
+ || DECL_ONE_ONLY (DECL) \
+ || DECL_WEAK (DECL)))) \
{ \
int size = int_size_in_bytes (TREE_TYPE (DECL)); \
\