aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-12-02 22:44:37 -0800
committerJim Wilson <wilson@gcc.gnu.org>1992-12-02 22:44:37 -0800
commit4bdf6e3d08a603fcfc175c4b3376b6c7f41efa6f (patch)
tree4928a38dec8a352f8834e2dc533d8dd958cade48 /gcc
parentc4eb2bd742db1fc8b6edca92717a42d06de8f557 (diff)
downloadgcc-4bdf6e3d08a603fcfc175c4b3376b6c7f41efa6f.zip
gcc-4bdf6e3d08a603fcfc175c4b3376b6c7f41efa6f.tar.gz
gcc-4bdf6e3d08a603fcfc175c4b3376b6c7f41efa6f.tar.bz2
(ASM_SPEC): Pass "-K PIC" to assembler when pic.
(JUMP_TABLES_IN_TEXT_SECTION): Define. (SELECT_RTX_SECTION): Define. From-SVN: r2832
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/sol2.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index 16ee986..edd5d60 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -30,7 +30,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
It's safe to pass -s always, even if -g is not used. */
#undef ASM_SPEC
#define ASM_SPEC \
- "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s"
+ "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
+ %{fpic:-K PIC} %{fPIC:-K PIC}"
/* However it appears that Solaris 2.0 uses the same reg numbering as
the old BSD-style system did. */
@@ -77,6 +78,21 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define CTORS_SECTION_ASM_OP "\t.section\t\".ctors\",#alloc,#execinstr\n"
#define DTORS_SECTION_ASM_OP "\t.section\t\".dtors\",#alloc,#execinstr\n"
+/* The native assembler can't compute differences between symbols in different
+ sections when generating pic code, so we must put jump tables in the
+ text section. */
+#define JUMP_TABLES_IN_TEXT_SECTION 1
+
+/* 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 Solaris 2 assembler uses .skip, not .zero, so put this back. */
#undef ASM_OUTPUT_SKIP
#define ASM_OUTPUT_SKIP(FILE,SIZE) \