diff options
| author | John Polstra <jdp@FreeBSD.org> | 1999-04-28 00:08:14 +0000 |
|---|---|---|
| committer | John Polstra <jdp@FreeBSD.org> | 1999-04-28 00:08:14 +0000 |
| commit | ca220c20111c776574f10aeafd47bbe1e48cc0ff (patch) | |
| tree | 1fc4669b372a5289f14f2440cce1887117724e3b | |
| parent | a7271444c3f69ab2e7d5a0375f226af765b61e39 (diff) | |
Notes
| -rw-r--r-- | lib/csu/alpha/Makefile | 4 | ||||
| -rw-r--r-- | lib/csu/alpha/crt1.c | 30 |
2 files changed, 7 insertions, 27 deletions
diff --git a/lib/csu/alpha/Makefile b/lib/csu/alpha/Makefile index 473dc99e201a..915b4eaef32e 100644 --- a/lib/csu/alpha/Makefile +++ b/lib/csu/alpha/Makefile @@ -1,11 +1,11 @@ # -# $Id: Makefile,v 1.6 1998/08/20 21:37:22 jb Exp $ +# $Id: Makefile,v 1.9 1999/04/24 02:07:17 jdp Exp $ # SRCS= crt1.c crtbegin.c crtend.c OBJS= crt1.o crtbegin.o crtend.o SOBJS= crtbegin.So crtend.So -CFLAGS+= -Wall -Wno-unused -I${.CURDIR}/../../../libexec/rtld-elf +CFLAGS+= -Wall -Wno-unused NOMAN= true NOPIC= true NOPROFILE= true diff --git a/lib/csu/alpha/crt1.c b/lib/csu/alpha/crt1.c index ac87526ca9af..f04517d01af4 100644 --- a/lib/csu/alpha/crt1.c +++ b/lib/csu/alpha/crt1.c @@ -30,7 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: crt1.c,v 1.3 1999/01/07 20:18:18 steve Exp $ + * $Id: crt1.c,v 1.5 1999/04/24 02:07:17 jdp Exp $ */ #ifndef __GNUC__ @@ -39,21 +39,8 @@ #include <stdlib.h> -#include <sys/exec.h> -#include <sys/syscall.h> -#include <rtld.h> - -const Obj_Entry *__mainprog_obj; - -extern int __syscall (int, ...); -#define _exit(v) __syscall(SYS_exit, (v)) -#define write(fd, s, n) __syscall(SYS_write, (fd), (s), (n)) - -#define _FATAL(str) \ - do { \ - write(2, str, sizeof(str)); \ - _exit(1); \ - } while (0) +struct Struct_Obj_Entry; +struct ps_strings; #pragma weak _DYNAMIC extern int _DYNAMIC; @@ -69,7 +56,7 @@ char *__progname = ""; void _start(char **ap, void (*cleanup)(void), /* from shared loader */ - const Obj_Entry *obj, /* from shared loader */ + struct Struct_Obj_Entry *obj, /* from shared loader */ struct ps_strings *ps_strings) { int argc; @@ -88,15 +75,8 @@ _start(char **ap, __progname = s + 1; } - if (&_DYNAMIC != NULL) { - if ((obj == NULL) || (obj->magic != RTLD_MAGIC)) - _FATAL("Corrupt Obj_Entry pointer in GOT"); - if (obj->version != RTLD_VERSION) - _FATAL("Dynamic linker version mismatch"); - - __mainprog_obj = obj; + if (&_DYNAMIC != NULL) atexit(cleanup); - } atexit(_fini); _init(); |
