mips.h (ENCODE_SECTION_INFO): Don't use %gprel for symbols that are going to be place...
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 18 Mar 2002 19:15:24 +0000 (19:15 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Mon, 18 Mar 2002 19:15:24 +0000 (19:15 +0000)
* 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

gcc/ChangeLog
gcc/config/mips/mips.h

index 429a2ff3ff21394ee503bb4fc9053b3630c61fcf..7bbb1b04648d3ad8297d3db2c99531273ee99040 100644 (file)
@@ -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
index bc09632e73fe70cf63e23c2632482bfb39e998b5..536ef51461da4a899171acd0cb291317a7f62450 100644 (file)
@@ -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));                \
                                                                        \