199282790SJohn Baldwin /* LINTLIBRARY */ 299282790SJohn Baldwin /*- 399282790SJohn Baldwin * Copyright 1996-1998 John D. Polstra. 499282790SJohn Baldwin * Copyright (c) 2015-2017 Ruslan Bukin <br@bsdpad.com> 599282790SJohn Baldwin * All rights reserved. 699282790SJohn Baldwin * 799282790SJohn Baldwin * Portions of this software were developed by SRI International and the 899282790SJohn Baldwin * University of Cambridge Computer Laboratory under DARPA/AFRL contract 999282790SJohn Baldwin * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme. 1099282790SJohn Baldwin * 1199282790SJohn Baldwin * Portions of this software were developed by the University of Cambridge 1299282790SJohn Baldwin * Computer Laboratory as part of the CTSRD Project, with support from the 1399282790SJohn Baldwin * UK Higher Education Innovation Fund (HEIF). 1499282790SJohn Baldwin * 1599282790SJohn Baldwin * Redistribution and use in source and binary forms, with or without 1699282790SJohn Baldwin * modification, are permitted provided that the following conditions 1799282790SJohn Baldwin * are met: 1899282790SJohn Baldwin * 1. Redistributions of source code must retain the above copyright 1999282790SJohn Baldwin * notice, this list of conditions and the following disclaimer. 2099282790SJohn Baldwin * 2. Redistributions in binary form must reproduce the above copyright 2199282790SJohn Baldwin * notice, this list of conditions and the following disclaimer in the 2299282790SJohn Baldwin * documentation and/or other materials provided with the distribution. 2399282790SJohn Baldwin * 2499282790SJohn Baldwin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2599282790SJohn Baldwin * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2699282790SJohn Baldwin * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2799282790SJohn Baldwin * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2899282790SJohn Baldwin * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2999282790SJohn Baldwin * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3099282790SJohn Baldwin * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3199282790SJohn Baldwin * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3299282790SJohn Baldwin * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 3399282790SJohn Baldwin * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3499282790SJohn Baldwin */ 3599282790SJohn Baldwin 3699282790SJohn Baldwin #include <sys/cdefs.h> 3799282790SJohn Baldwin __FBSDID("$FreeBSD$"); 3899282790SJohn Baldwin 3999282790SJohn Baldwin #include "libc_private.h" 40*51015e6dSKonstantin Belousov #include "csu_common.h" 4199282790SJohn Baldwin 42*51015e6dSKonstantin Belousov void __start(int argc, char **argv, char **env, void (*cleanup)(void)) __dead2; 4399282790SJohn Baldwin 4499282790SJohn Baldwin void 4599282790SJohn Baldwin __start(int argc, char **argv, char **env, void (*cleanup)(void)) 4699282790SJohn Baldwin { 4799282790SJohn Baldwin #ifdef GCRT 48*51015e6dSKonstantin Belousov __libc_start1_gcrt(argc, argv, env, cleanup, main, &eprol, &etext); 4999282790SJohn Baldwin __asm__("eprol:"); 50*51015e6dSKonstantin Belousov #else 51*51015e6dSKonstantin Belousov __libc_start1(argc, argv, env, cleanup, main); 5299282790SJohn Baldwin #endif 5399282790SJohn Baldwin } 54