diff options
Diffstat (limited to 'lib/csu/i386/crt1_c.c')
-rw-r--r-- | lib/csu/i386/crt1_c.c | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/lib/csu/i386/crt1_c.c b/lib/csu/i386/crt1_c.c index b39134824f7e..5755a66afbb2 100644 --- a/lib/csu/i386/crt1_c.c +++ b/lib/csu/i386/crt1_c.c @@ -22,52 +22,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD$ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - -#include <stdlib.h> - -#include "libc_private.h" -#include "ignore_init.c" - -extern void _start(char *, ...); - -#ifdef GCRT -extern void _mcleanup(void); -extern void monstartup(void *, void *); -extern int eprol; -extern int etext; -#endif - -void _start1(void (*)(void), int, char *[]) __dead2; - -/* The entry function, C part. */ -void -_start1(void (*cleanup)(void), int argc, char *argv[]) -{ - char **env; - - env = argv + argc + 1; - handle_argv(argc, argv, env); - if (&_DYNAMIC != NULL) { - atexit(cleanup); - } else { - process_irelocs(); - _init_tls(); - } - -#ifdef GCRT - atexit(_mcleanup); - monstartup(&eprol, &etext); -__asm__("eprol:"); -#endif - - handle_static_init(argc, argv, env); - exit(main(argc, argv, env)); -} +#include "csu_common.h" -__asm(".hidden _start1"); +void _start(char *, ...) __dead2; |