pa.h (SELECT_SECTION): Define.
authorJeffrey A Law <law@cygnus.com>
Mon, 9 Aug 1999 07:17:32 +0000 (07:17 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 9 Aug 1999 07:17:32 +0000 (01:17 -0600)
Mon Aug  9 01:15:24 1999  Jeffrey A Law  (law@cygnus.com)

        * pa.h (SELECT_SECTION): Define.
        * som.h (SELECT_SECTION): Delete.

From-SVN: r28617

gcc/ChangeLog
gcc/config/pa/pa.h
gcc/config/pa/som.h

index 874f286052b1a9bb58b3ddc74cf94c924f77145a..2b896967a396e4daea62364f5abbbe7248b9b2cb 100644 (file)
@@ -1,3 +1,8 @@
+Mon Aug  9 01:15:24 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * pa.h (SELECT_SECTION): Define.
+       * som.h (SELECT_SECTION): Delete.
+
 Sun Aug  8 15:13:20 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * alias.c (init_alias_analysis): Wrap call to 
index 7ea6bdb6009750697e91a5cba1f979db79caa590..d0bc5b2abd859f48f8d49e510a8379705f7d2a33 100644 (file)
@@ -1586,6 +1586,26 @@ extern struct rtx_def *hppa_legitimize_address ();
   else                                 \
     readonly_data_section ();
 
+/* On hpux10, the linker will give an error if we have a reference
+   in the read-only data section to a symbol defined in a shared
+   library.  Therefore, expressions that might require a reloc can
+   not be placed in the read-only data section.  */
+#define SELECT_SECTION(EXP,RELOC) \
+  if (TREE_CODE (EXP) == VAR_DECL \
+      && TREE_READONLY (EXP) \
+      && !TREE_THIS_VOLATILE (EXP) \
+      && DECL_INITIAL (EXP) \
+      && (DECL_INITIAL (EXP) == error_mark_node \
+          || TREE_CONSTANT (DECL_INITIAL (EXP))) \
+      && !RELOC) \
+    readonly_data_section (); \
+  else if (TREE_CODE_CLASS (TREE_CODE (EXP)) == 'c' \
+          && !(TREE_CODE (EXP) == STRING_CST && flag_writable_strings) \
+          && !RELOC) \
+    readonly_data_section (); \
+  else \
+    data_section ();
+   
 /* Define this macro if references to a symbol must be treated
    differently depending on something about the variable or
    function named by the symbol (such as what section it is in).
index f9c7682d2eaf9217c5cdfb0c4b515392414d13cd..291faee94540b1d4f1f21ebc877a6d0f51490e6d 100644 (file)
@@ -51,26 +51,6 @@ Boston, MA 02111-1307, USA.  */
   fprintf (FILE,                                                       \
           "\t.stabs \"\",%d,0,0,L$text_end0000\nL$text_end0000:\n", N_SO)
 
-/* On hpux10, the linker will give an error if we have a reference
-   in the read-only data section to a symbol defined in a shared
-   library.  Therefore, expressions that might require a reloc can
-   not be placed in the read-only data section.  */
-#define SELECT_SECTION(EXP,RELOC) \
-  if (TREE_CODE (EXP) == VAR_DECL \
-      && TREE_READONLY (EXP) \
-      && !TREE_THIS_VOLATILE (EXP) \
-      && DECL_INITIAL (EXP) \
-      && (DECL_INITIAL (EXP) == error_mark_node \
-          || TREE_CONSTANT (DECL_INITIAL (EXP))) \
-      && !RELOC) \
-    readonly_data_section (); \
-  else if (TREE_CODE_CLASS (TREE_CODE (EXP)) == 'c' \
-          && !(TREE_CODE (EXP) == STRING_CST && flag_writable_strings) \
-          && !RELOC) \
-    readonly_data_section (); \
-  else \
-    data_section ();
-   
 /* HPUX has a program 'chatr' to list the dependencies of dynamically
    linked executables and shared libraries.  */
 #define LDD_SUFFIX "chatr"