aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/config.host23
-rw-r--r--libgcc/config.in3
-rw-r--r--libgcc/config/i386/sol2-c1.S173
-rw-r--r--libgcc/config/sol2/gmon.c23
-rw-r--r--libgcc/config/sol2/t-sol26
-rw-r--r--libgcc/config/sparc/sol2-c1.S103
-rwxr-xr-xlibgcc/configure32
-rw-r--r--libgcc/configure.ac25
8 files changed, 5 insertions, 383 deletions
diff --git a/libgcc/config.host b/libgcc/config.host
index e75a7af..a8e465a 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -345,24 +345,11 @@ case ${host} in
# Add cpu-specific t-sol2 after t-slibgcc-* so it can augment SHLIB_MAPFILES.
tmake_file="$tmake_file $cpu_type/t-sol2"
extra_parts="gmon.o crtbegin.o crtend.o"
- if test "${libgcc_cv_solaris_crts}" = yes; then
- # Solaris 11.4 provides crt1.o, crti.o, and crtn.o as part of the
- # base system. crtp.o and crtpg.o implement the compiler-dependent parts.
- extra_parts="$extra_parts crtp.o crtpg.o"
- # If the Solaris CRTs are present, both ld and gld will have PIE support.
- extra_parts="$extra_parts crtbeginS.o crtendS.o"
- else
- case ${host} in
- i?86-*-solaris2* | x86_64-*-solaris2*)
- # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
- # part of the base system.
- ;;
- sparc*-*-solaris2*)
- # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
- extra_parts="$extra_parts crt1.o gcrt1.o"
- ;;
- esac
- fi
+ # Solaris 11.4 provides crt1.o, crti.o, and crtn.o as part of the
+ # base system. crtp.o and crtpg.o implement the compiler-dependent parts.
+ extra_parts="$extra_parts crtp.o crtpg.o"
+ # If the Solaris CRTs are present, both ld and gld will have PIE support.
+ extra_parts="$extra_parts crtbeginS.o crtendS.o"
if test x$enable_vtable_verify = xyes; then
extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
fi
diff --git a/libgcc/config.in b/libgcc/config.in
index 8f7dd43..a8b6f91 100644
--- a/libgcc/config.in
+++ b/libgcc/config.in
@@ -34,9 +34,6 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define if the system-provided CRTs are present on Solaris. */
-#undef HAVE_SOLARIS_CRTS
-
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
diff --git a/libgcc/config/i386/sol2-c1.S b/libgcc/config/i386/sol2-c1.S
deleted file mode 100644
index 64c0339..0000000
--- a/libgcc/config/i386/sol2-c1.S
+++ /dev/null
@@ -1,173 +0,0 @@
-/* crt1.s for Solaris 2, x86
-
- Copyright (C) 1993-2024 Free Software Foundation, Inc.
- Written By Fred Fish, Nov 1992
-
-This file is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3, or (at your option) any
-later version.
-
-This file is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-
-/* This file takes control of the process from the kernel, as specified
- in section 3 of the System V Application Binary Interface, Intel386
- Processor Supplement. It has been constructed from information obtained
- from the ABI, information obtained from single stepping existing
- Solaris executables through their startup code with gdb, and from
- information obtained by single stepping executables on other i386 SVR4
- implementations. This file is the first thing linked into any
- executable. */
-
-#ifndef GCRT1
- .ident "GNU C crt1.s"
-#define CLEANUP _cleanup
-#else
-/* This is a modified crt1.s by J.W.Hawtin <oolon@ankh.org> 15/8/96,
- to allow program profiling, by calling monstartup on entry and _mcleanup
- on exit. */
- .ident "GNU C gcrt1.s"
-#define CLEANUP _mcleanup
-#endif
- .weak _cleanup
- .weak _DYNAMIC
- .text
-
-/* Start creating the initial frame by pushing a NULL value for the return
- address of the initial frame, and mark the end of the stack frame chain
- (the innermost stack frame) with a NULL value, per page 3-32 of the ABI.
- Initialize the first stack frame pointer in %ebp (the contents of which
- are unspecified at process initialization). */
-
- .globl _start
-_start:
- pushl $0x0
- pushl $0x0
- movl %esp,%ebp
-
-/* As specified per page 3-32 of the ABI, %edx contains a function
- pointer that should be registered with atexit(), for proper
- shared object termination. Just push it onto the stack for now
- to preserve it. We want to register _cleanup() first. */
-
- pushl %edx
-
-/* Check to see if there is an _cleanup() function linked in, and if
- so, register it with atexit() as the last thing to be run by
- atexit(). */
-
- movl $CLEANUP,%eax
- testl %eax,%eax
- je .L1
- pushl $CLEANUP
- call atexit
- addl $0x4,%esp
-.L1:
-
-/* Now check to see if we have an _DYNAMIC table, and if so then
- we need to register the function pointer previously in %edx, but
- now conveniently saved on the stack as the argument to pass to
- atexit(). */
-
- movl $_DYNAMIC,%eax
- testl %eax,%eax
- je .L2
- call atexit
-.L2:
-
-/* Register _fini() with atexit(). We will take care of calling _init()
- directly. */
-
- pushl $_fini
- call atexit
-
-#ifdef GCRT1
-/* Start profiling. */
-
- pushl %ebp
- movl %esp,%ebp
- pushl $_etext
- pushl $_start
- call monstartup
- addl $8,%esp
- popl %ebp
-#endif
-
-/* Compute the address of the environment vector on the stack and load
- it into the global variable _environ. Currently argc is at 8 off
- the frame pointer. Fetch the argument count into %eax, scale by the
- size of each arg (4 bytes) and compute the address of the environment
- vector which is 16 bytes (the two zero words we pushed, plus argc,
- plus the null word terminating the arg vector) further up the stack,
- off the frame pointer (whew!). */
-
- movl 8(%ebp),%eax
- leal 16(%ebp,%eax,4),%edx
- movl %edx,_environ
-
-/* Push the environment vector pointer, the argument vector pointer,
- and the argument count on to the stack to set up the arguments
- for _init(), _fpstart(), and main(). Note that the environment
- vector pointer and the arg count were previously loaded into
- %edx and %eax respectively. The only new value we need to compute
- is the argument vector pointer, which is at a fixed address off
- the initial frame pointer. */
-
-/* Make sure the stack is properly aligned. */
- andl $0xfffffff0,%esp
- subl $4,%esp
-
- pushl %edx
- leal 12(%ebp),%edx
- pushl %edx
- pushl %eax
-
-/* Call _init(argc, argv, environ), _fpstart(argc, argv, environ), and
- main(argc, argv, environ). */
-
- call _init
- call __fpstart
- call main
-
-/* Pop the argc, argv, and environ arguments off the stack, push the
- value returned from main(), and call exit(). */
-
- addl $12,%esp
- pushl %eax
- call exit
-
-/* An inline equivalent of _exit, as specified in Figure 3-26 of the ABI. */
-
- pushl $0x0
- movl $0x1,%eax
- lcall $7,$0
-
-/* If all else fails, just try a halt! */
-
- hlt
- .type _start,@function
- .size _start,.-_start
-
-#ifndef GCRT1
-/* A dummy profiling support routine for non-profiling executables,
- in case we link in some objects that have been compiled for profiling. */
-
- .weak _mcount
-_mcount:
- ret
- .type _mcount,@function
- .size _mcount,.-_mcount
-#endif
diff --git a/libgcc/config/sol2/gmon.c b/libgcc/config/sol2/gmon.c
index 652fd1e..7b30174 100644
--- a/libgcc/config/sol2/gmon.c
+++ b/libgcc/config/sol2/gmon.c
@@ -316,29 +316,6 @@ internal_mcount (char *selfpc, unsigned short *frompcindex)
/* Only necessary without the Solaris CRTs or a proper gcrt1.o, otherwise
crtpg.o or gcrt1.o take care of that.
- FIXME: What about _init vs. _start on sparc? */
-#ifndef HAVE_SOLARIS_CRTS
- if(!already_setup) {
- extern char etext[];
-
- already_setup = 1;
-
-#if defined __i386__
- /* <sys/vmparam.h> USERSTACK. */
- monstartup ((char *) 0x8048000, etext);
-#elif defined __x86_64__
- monstartup (NULL, etext);
-#elif defined __sparc__
- {
- extern char _start[];
- extern char _init[];
-
- monstartup (_start < _init ? _start : _init, etext);
- }
-#endif
- atexit (_mcleanup);
- }
-#endif /* !HAVE_SOLARIS_CRTS */
/* Check that we are profiling and that we aren't recursively invoked. */
if (profiling) {
goto out;
diff --git a/libgcc/config/sol2/t-sol2 b/libgcc/config/sol2/t-sol2
index 3ac1be3..e7494c5 100644
--- a/libgcc/config/sol2/t-sol2
+++ b/libgcc/config/sol2/t-sol2
@@ -25,9 +25,3 @@ crtpg.o: $(srcdir)/config/sol2/crtpg.c
# gmon build rule
gmon.o: $(srcdir)/config/sol2/gmon.c
$(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $<
-
-# Assemble startup files.
-crt1.o: $(srcdir)/config/$(cpu_type)/sol2-c1.S
- $(crt_compile) -c $<
-gcrt1.o: $(srcdir)/config/$(cpu_type)/sol2-c1.S
- $(crt_compile) -c -DGCRT1 $<
diff --git a/libgcc/config/sparc/sol2-c1.S b/libgcc/config/sparc/sol2-c1.S
deleted file mode 100644
index fecbb66..0000000
--- a/libgcc/config/sparc/sol2-c1.S
+++ /dev/null
@@ -1,103 +0,0 @@
-! crt1.s for sparc & sparcv9 (SunOS 5)
-
-! Copyright (C) 1992-2024 Free Software Foundation, Inc.
-! Written By David Vinayak Henkel-Wallace, June 1992
-!
-! This file is free software; you can redistribute it and/or modify it
-! under the terms of the GNU General Public License as published by the
-! Free Software Foundation; either version 3, or (at your option) any
-! later version.
-!
-! This file is distributed in the hope that it will be useful, but
-! WITHOUT ANY WARRANTY; without even the implied warranty of
-! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-! General Public License for more details.
-!
-! Under Section 7 of GPL version 3, you are granted additional
-! permissions described in the GCC Runtime Library Exception, version
-! 3.1, as published by the Free Software Foundation.
-!
-! You should have received a copy of the GNU General Public License and
-! a copy of the GCC Runtime Library Exception along with this program;
-! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-! <http://www.gnu.org/licenses/>.
-
-! This file takes control of the process from the kernel, as specified
-! in section 3 of the SVr4 ABI.
-! This file is the first thing linked into any executable.
-
-#ifdef __sparcv9
-#define CPTRSIZE 8
-#define CPTRSHIFT 3
-#define STACK_BIAS 2047
-#define ldn ldx
-#define stn stx
-#define setn(s, scratch, dst) setx s, scratch, dst
-#else
-#define CPTRSIZE 4
-#define CPTRSHIFT 2
-#define STACK_BIAS 0
-#define ldn ld
-#define stn st
-#define setn(s, scratch, dst) set s, dst
-#endif
-
- .section ".text"
- .proc 022
- .global _start
-
-_start:
- mov 0, %fp ! Mark bottom frame pointer
- ldn [%sp + (16 * CPTRSIZE) + STACK_BIAS], %l0 ! argc
- add %sp, (17 * CPTRSIZE) + STACK_BIAS, %l1 ! argv
-
- ! Leave some room for a call. Sun leaves 32 octets (to sit on
- ! a cache line?) so we do too.
-#ifdef __sparcv9
- sub %sp, 48, %sp
-#else
- sub %sp, 32, %sp
-#endif
-
- ! %g1 may contain a function to be registered w/atexit
- orcc %g0, %g1, %g0
-#ifdef __sparcv9
- be %xcc, .nope
-#else
- be .nope
-#endif
- mov %g1, %o0
- call atexit
- nop
-.nope:
- ! Now make sure constructors and destructors are handled.
- setn(_fini, %o1, %o0)
- call atexit, 1
- nop
- call _init, 0
- nop
-
- ! We ignore the auxiliary vector; there is no defined way to
- ! access those data anyway. Instead, go straight to main:
- mov %l0, %o0 ! argc
- mov %l1, %o1 ! argv
-#ifdef GCRT1
- setn(___Argv, %o4, %o3)
- stn %o1, [%o3] ! *___Argv
-#endif
- ! Skip argc words past argv, to env:
- sll %l0, CPTRSHIFT, %o2
- add %o2, CPTRSIZE, %o2
- add %l1, %o2, %o2 ! env
- setn(_environ, %o4, %o3)
- stn %o2, [%o3] ! *_environ
- call main, 4
- nop
- call exit, 0
- nop
- call _exit, 0
- nop
- ! We should never get here.
-
- .type _start,#function
- .size _start,.-_start
diff --git a/libgcc/configure b/libgcc/configure
index cff1eff..a69d314 100755
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -5110,38 +5110,6 @@ fi
$as_echo "$libgcc_cv_mips_hard_float" >&6; }
esac
-case ${host} in
-*-*-solaris2*)
- # Check for system-provided CRTs on Solaris 11.4.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking system-provided CRTs on Solaris" >&5
-$as_echo_n "checking system-provided CRTs on Solaris... " >&6; }
-if ${libgcc_cv_solaris_crts+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- libgcc_cv_solaris_crts=no
- libgcc_sysroot="`${CC} -print-sysroot`"
- libgcc_libdir="$libgcc_sysroot/usr/lib"
- # At the time they were added, gcrt1.o became a symlink for backwards
- # compatibility on x86, while crt1.o was added on sparc, so check for that.
- case ${host} in
- i?86-*-solaris2* | x86_64-*-solaris2*)
- if test -h "$libgcc_libdir/gcrt1.o"; then libgcc_cv_solaris_crts=yes; fi
- ;;
- sparc*-*-solaris2*)
- if test -f "$libgcc_libdir/crt1.o"; then libgcc_cv_solaris_crts=yes; fi
- ;;
- esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_solaris_crts" >&5
-$as_echo "$libgcc_cv_solaris_crts" >&6; }
- if test $libgcc_cv_solaris_crts = yes; then
-
-$as_echo "#define HAVE_SOLARIS_CRTS 1" >>confdefs.h
-
- fi
- ;;
-esac
-
# Determine the version of glibc, if any, used on the target.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target glibc version" >&5
$as_echo_n "checking for target glibc version... " >&6; }
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 4e8c036..c2749fe 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -346,31 +346,6 @@ mips*-*-*)
[libgcc_cv_mips_hard_float=no])])
esac
-case ${host} in
-*-*-solaris2*)
- # Check for system-provided CRTs on Solaris 11.4.
- AC_CACHE_CHECK([system-provided CRTs on Solaris],
- [libgcc_cv_solaris_crts],
- [libgcc_cv_solaris_crts=no
- libgcc_sysroot="`${CC} -print-sysroot`"
- libgcc_libdir="$libgcc_sysroot/usr/lib"
- # At the time they were added, gcrt1.o became a symlink for backwards
- # compatibility on x86, while crt1.o was added on sparc, so check for that.
- case ${host} in
- i?86-*-solaris2* | x86_64-*-solaris2*)
- if test -h "$libgcc_libdir/gcrt1.o"; then libgcc_cv_solaris_crts=yes; fi
- ;;
- sparc*-*-solaris2*)
- if test -f "$libgcc_libdir/crt1.o"; then libgcc_cv_solaris_crts=yes; fi
- ;;
- esac])
- if test $libgcc_cv_solaris_crts = yes; then
- AC_DEFINE(HAVE_SOLARIS_CRTS, 1,
- [Define if the system-provided CRTs are present on Solaris.])
- fi
- ;;
-esac
-
# Determine the version of glibc, if any, used on the target.
AC_MSG_CHECKING([for target glibc version])
AC_ARG_WITH([glibc-version],