From 62191265703d93ac96d08e284efb482853a7f9ab Mon Sep 17 00:00:00 2001 From: jdp Date: Sat, 24 Apr 1999 02:07:17 +0000 Subject: Remove some left-over stuff from NetBSD that we don't need. This eliminates the need to include the dynamic linker's private header file, as well as two other headers from . --- lib/csu/alpha/Makefile | 6 ++---- lib/csu/alpha/crt1.c | 30 +++++------------------------- 2 files changed, 7 insertions(+), 29 deletions(-) (limited to 'lib/csu') diff --git a/lib/csu/alpha/Makefile b/lib/csu/alpha/Makefile index 4460b44..fc567d8 100644 --- a/lib/csu/alpha/Makefile +++ b/lib/csu/alpha/Makefile @@ -1,13 +1,11 @@ # -# $Id: Makefile,v 1.7 1999/01/09 21:50:56 jdp Exp $ +# $Id: Makefile,v 1.8 1999/04/09 05:56:23 jdp Exp $ # -RTLDDIR= ${.CURDIR}/../../../libexec/rtld-elf - SRCS= crt1.c crtbegin.c crtend.c OBJS= crt1.o crtbegin.o crtend.o SOBJS= crtbegin.So crtend.So -CFLAGS+= -Wall -Wno-unused -I${RTLDDIR}/${MACHINE_ARCH} -I${RTLDDIR} +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 ac87526..0189e50 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.4 1999/01/19 06:58:31 simokawa Exp $ */ #ifndef __GNUC__ @@ -39,21 +39,8 @@ #include -#include -#include -#include - -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(); -- cgit v1.1