aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/sol2.h36
1 files changed, 28 insertions, 8 deletions
diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
index 6bf0599..1758b91 100644
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -150,6 +150,10 @@ along with GCC; see the file COPYING3. If not see
#define MD_EXEC_PREFIX "/usr/ccs/bin/"
#endif
+/* Enable constructor priorities if the configured linker supports it. */
+#undef SUPPORTS_INIT_PRIORITY
+#define SUPPORTS_INIT_PRIORITY HAVE_INITFINI_ARRAY_SUPPORT
+
#undef STARTFILE_ARCH_SPEC
#define STARTFILE_ARCH_SPEC "%{ansi:values-Xc.o%s} \
%{!ansi:values-Xa.o%s}"
@@ -162,6 +166,22 @@ along with GCC; see the file COPYING3. If not see
#define STARTFILE_CRTBEGIN_SPEC "crtbegin.o%s"
#endif
+#if SUPPORTS_INIT_PRIORITY
+#define STARTFILE_VTV_SPEC \
+ "%{fvtable-verify=none:%s; \
+ fvtable-verify=preinit:vtv_start_preinit.o%s; \
+ fvtable-verify=std:vtv_start.o%s}"
+
+#define ENDFILE_VTV_SPEC \
+ "%{fvtable-verify=none:%s; \
+ fvtable-verify=preinit:vtv_end_preinit.o%s; \
+ fvtable-verify=std:vtv_end.o%s}"
+#else
+#define STARTFILE_VTV_SPEC \
+ "%{fvtable-verify:%e-fvtable-verify is not supported in this configuration}"
+#define ENDFILE_VTV_SPEC ""
+#endif
+
/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */
#undef STARTFILE_SPEC
#ifdef HAVE_SOLARIS_CRTS
@@ -172,13 +192,15 @@ along with GCC; see the file COPYING3. If not see
%{p:%e-p is not supported; \
pg:crtpg.o%s gmon.o%s; \
:crtp.o%s}}} \
- crti.o%s %(startfile_arch) %(startfile_crtbegin)"
+ crti.o%s %(startfile_arch) %(startfile_crtbegin) \
+ %(startfile_vtv)"
#else
#define STARTFILE_SPEC "%{!shared:%{!symbolic: \
%{p:mcrt1.o%s; \
pg:gcrt1.o%s gmon.o%s; \
:crt1.o%s}}} \
- crti.o%s %(startfile_arch) %(startfile_crtbegin)"
+ crti.o%s %(startfile_arch) %(startfile_crtbegin) \
+ %(startfile_vtv)"
#endif
#if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
@@ -192,7 +214,7 @@ along with GCC; see the file COPYING3. If not see
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
- %(endfile_arch) %(endfile_crtend) crtn.o%s"
+ %(endfile_arch) %(endfile_vtv) %(endfile_crtend) crtn.o%s"
#undef LINK_ARCH32_SPEC_BASE
#define LINK_ARCH32_SPEC_BASE \
@@ -267,12 +289,14 @@ along with GCC; see the file COPYING3. If not see
#define SUBTARGET_EXTRA_SPECS \
{ "startfile_arch", STARTFILE_ARCH_SPEC }, \
{ "startfile_crtbegin", STARTFILE_CRTBEGIN_SPEC }, \
+ { "startfile_vtv", STARTFILE_VTV_SPEC }, \
{ "link_arch32", LINK_ARCH32_SPEC }, \
{ "link_arch64", LINK_ARCH64_SPEC }, \
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC }, \
{ "endfile_arch", ENDFILE_ARCH_SPEC }, \
- { "endfile_crtend", ENDFILE_CRTEND_SPEC }, \
+ { "endfile_crtend", ENDFILE_CRTEND_SPEC }, \
+ { "endfile_vtv", ENDFILE_VTV_SPEC }, \
SUBTARGET_CPU_EXTRA_SPECS
/* C++11 programs need -lrt for nanosleep. */
@@ -398,10 +422,6 @@ along with GCC; see the file COPYING3. If not see
#define NO_DBX_BNSYM_ENSYM 1
#endif
-/* Enable constructor priorities if the configured linker supports it. */
-#undef SUPPORTS_INIT_PRIORITY
-#define SUPPORTS_INIT_PRIORITY HAVE_INITFINI_ARRAY_SUPPORT
-
/* Solaris has an implementation of __enable_execute_stack. */
#define HAVE_ENABLE_EXECUTE_STACK