(SELECT_RTX_SECTION): Add.
authorJim Wilson <wilson@gcc.gnu.org>
Fri, 18 Mar 1994 20:47:03 +0000 (12:47 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 18 Mar 1994 20:47:03 +0000 (12:47 -0800)
(ASM_SPEC): Pass -K to assembler when PIC.

From-SVN: r6815

gcc/config/sparc/sysv4.h

index e331c9d29740b3644b2e6980a318ed3299e6a3c1..5c3ae6fe701f188a92c0b1ef8e579f8be2846dc8 100644 (file)
@@ -61,6 +61,22 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
    text section.  */
 #define JUMP_TABLES_IN_TEXT_SECTION 1
 
+/* Pass -K to the assembler when PIC.  */
+#undef ASM_SPEC
+#define ASM_SPEC \
+  "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
+   %{fpic:-K PIC} %{fPIC:-K PIC}"
+
+/* Must use data section for relocatable constants when pic.  */
+#undef SELECT_RTX_SECTION
+#define SELECT_RTX_SECTION(MODE,RTX)           \
+{                                              \
+  if (flag_pic && symbolic_operand (RTX))      \
+    data_section ();                           \
+  else                                         \
+    const_section ();                          \
+}
+
 /* The specialized code which needs to appear in the .init section prior
    to the prologue code for `__do_global_ctors' (see crtstuff.c).