From aa8d5dcbe5b64f8d3683ee419ecb9a712de43a01 Mon Sep 17 00:00:00 2001 From: David Rhodus Date: Sat, 20 Mar 2004 16:27:42 +0000 Subject: [PATCH] Start removing the old build infrastructure for the a.out binaries. MOst of the interface had already been depreciated for a while now and we only had remnants remaining. --- Makefile | 16 ++---- Makefile.inc1 | 10 ++-- etc/Makefile | 5 +- etc/rc.d/ldconfig | 17 +------ gnu/lib/gcc2/Makefile | 8 +-- gnu/lib/gcc2/libgcc/Makefile | 9 +--- gnu/usr.bin/gzip/Makefile | 4 +- gnu/usr.bin/gzip/match.S | 4 +- lib/Makefile | 6 +-- lib/libc/gen/dlfcn.c | 83 +----------------------------- lib/libc/gen/getobjformat.c | 87 +++----------------------------- lib/libc/gmon/gmon.c | 4 +- lib/libc/i386/SYS.h | 8 +-- lib/libmd/Makefile | 4 +- lib/libncurses/Makefile | 15 +----- lib/libpam/libpam/Makefile | 7 +-- lib/liby/Makefile | 27 +--------- libexec/Makefile | 11 +--- libexec/rtld-aout/shlib.c | 4 +- sbin/ifconfig/ifconfig.c | 3 +- sbin/ldconfig/ldconfig.c | 21 ++++---- share/mk/bsd.lib.mk | 22 +------- share/mk/bsd.own.mk | 9 +--- share/mk/sys.mk | 12 +---- sys/conf/kmod.mk | 7 +-- sys/cpu/i386/include/asm.h | 7 +-- sys/cpu/i386/include/param.h | 9 +--- sys/cpu/i386/include/profile.h | 6 +-- sys/i386/include/asm.h | 7 +-- sys/i386/include/param.h | 9 +--- sys/i386/include/profile.h | 6 +-- sys/kern/link_elf.c | 6 +-- sys/sys/cdefs.h | 24 +-------- tools/tools/kernxref/kernxref.sh | 9 +--- usr.bin/Makefile | 12 ++--- usr.bin/doscmd/Makefile | 33 +----------- usr.bin/ldd/sods.c | 4 +- usr.sbin/keyserv/Makefile | 5 +- usr.sbin/keyserv/crypt_server.c | 31 +----------- 39 files changed, 74 insertions(+), 497 deletions(-) diff --git a/Makefile b/Makefile index ab3dbd521a..0a0158f436 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # # $FreeBSD: src/Makefile,v 1.234.2.19 2003/04/16 09:59:40 ru Exp $ -# $DragonFly: src/Makefile,v 1.3 2003/11/19 01:05:31 dillon Exp $ +# $DragonFly: src/Makefile,v 1.4 2004/03/20 16:27:39 drhodus Exp $ # # The user-driven targets are: # @@ -57,13 +57,6 @@ # # See src/UPDATING `COMMON ITEMS' for more complete information. # -# If -DWANT_AOUT is specified, a `make world' with OBJFORMAT=elf will -# update the legacy support for aout. This includes all libraries, ld.so -# and boot objects. This part of build should be regarded as -# deprecated and you should _not_ expect to be able to do this past the -# release of 4.0. You have exactly one major release to move entirely -# to elf. -# # If TARGET_ARCH=arch (e.g. alpha) is specified you can # cross build world for other architectures using the buildworld target, # and once the world is built you can cross build a kernel using the @@ -88,9 +81,6 @@ # upgrade. Optionally, you can also start it with NOCONFIRM=yes and skip # the confirmation steps. # -# At the end of the upgrade procedure, /etc/objformat is created or -# updated to contain OBJFORMAT=elf. From then on, you're elf by default. -# # ---------------------------------------------------------------------------- # # @@ -134,7 +124,7 @@ STARTTIME!= LC_ALL=C date # world: upgrade_checks @echo "--------------------------------------------------------------" - @echo ">>> ${OBJFORMAT} make world started on ${STARTTIME}" + @echo ">>> elf make world started on ${STARTTIME}" @echo "--------------------------------------------------------------" .if target(pre-world) @echo @@ -154,7 +144,7 @@ world: upgrade_checks .endif @echo @echo "--------------------------------------------------------------" - @printf ">>> ${OBJFORMAT} make world completed on `LC_ALL=C date`\n (started ${STARTTIME})\n" + @printf ">>> elf make world completed on `LC_ALL=C date`\n (started ${STARTTIME})\n" @echo "--------------------------------------------------------------" # diff --git a/Makefile.inc1 b/Makefile.inc1 index baac2530b9..3d0e2508cf 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1,6 +1,6 @@ # # $FreeBSD: src/Makefile.inc1,v 1.141.2.62 2003/04/06 19:54:00 dwmalone Exp $ -# $DragonFly: src/Makefile.inc1,v 1.20 2004/02/02 05:43:07 dillon Exp $ +# $DragonFly: src/Makefile.inc1,v 1.21 2004/03/20 16:27:39 drhodus Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -178,7 +178,6 @@ INSTALLTMP= ${TMPDIR}/install.${TMPPID} CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ - OBJFORMAT_PATH=${WORLDTMP} \ PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 \ GROFF_BIN_PATH=${WORLDTMP}/usr/bin \ GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \ @@ -214,8 +213,7 @@ IMAKEENV= ${CROSSENV} \ IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 # kernel stage -KMAKEENV= ${WMAKEENV} \ - OBJFORMAT_PATH=${WORLDTMP}:${OBJFORMAT_PATH} +KMAKEENV= ${WMAKEENV} # /usr/bin/gccX version-specific gcc binaries # /usr/lib/gccX version-specific gcc libraries @@ -726,8 +724,8 @@ libraries: # _startup_libs2= gnu/lib/gcc2/csu gnu/lib/gcc2/libgcc _startup_libs3= gnu/lib/gcc3/csu gnu/lib/gcc3/libgcc -.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-${OBJFORMAT}) -_startup_libs= lib/csu/${MACHINE_ARCH}-${OBJFORMAT} +.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) +_startup_libs= lib/csu/${MACHINE_ARCH}-elf .else _startup_libs= lib/csu/${MACHINE_ARCH} .endif diff --git a/etc/Makefile b/etc/Makefile index d5e0b1420c..6cc4a0ad6c 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,6 +1,6 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD: src/etc/Makefile,v 1.219.2.38 2003/03/04 09:49:00 ru Exp $ -# $DragonFly: src/etc/Makefile,v 1.15 2004/02/16 05:14:03 dillon Exp $ +# $DragonFly: src/etc/Makefile,v 1.16 2004/03/20 16:27:39 drhodus Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail @@ -61,9 +61,6 @@ FREEBSD=COPYRIGHT distribute: cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} -.if defined(OBJFORMAT) - echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat -.endif upgrade_etc: cd ${.CURDIR}/../share/mk; ${MAKE} install diff --git a/etc/rc.d/ldconfig b/etc/rc.d/ldconfig index 96bb3519b0..11f8582d7f 100644 --- a/etc/rc.d/ldconfig +++ b/etc/rc.d/ldconfig @@ -2,7 +2,7 @@ # # $NetBSD: ldconfig,v 1.5 2002/03/22 04:33:58 thorpej Exp $ # $FreeBSD: src/etc/rc.d/ldconfig,v 1.7 2003/06/30 15:02:05 trhodes Exp $ -# $DragonFly: src/etc/rc.d/ldconfig,v 1.4 2004/01/26 17:21:15 rob Exp $ +# $DragonFly: src/etc/rc.d/ldconfig,v 1.5 2004/03/20 16:27:39 drhodus Exp $ # # PROVIDE: ldconfig @@ -31,21 +31,6 @@ ldconfig_start() done echo 'ELF ldconfig path:' ${_LDC} ${ldconfig} -elf ${_ins} ${_LDC} - # Legacy aout support for i386 only - case `sysctl -n hw.machine_arch` in - i386) - # Default the a.out ldconfig path. - : ${ldconfig_paths_aout=${ldconfig_paths}} - _LDC=/usr/lib/aout - for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do - if [ -r "${i}" ]; then - _LDC="${_LDC} ${i}" - fi - done - echo 'a.out ldconfig path:' ${_LDC} - ${ldconfig} -aout ${_ins} ${_LDC} - ;; - esac fi } diff --git a/gnu/lib/gcc2/Makefile b/gnu/lib/gcc2/Makefile index 243e9b9a37..110c9459b3 100644 --- a/gnu/lib/gcc2/Makefile +++ b/gnu/lib/gcc2/Makefile @@ -1,17 +1,11 @@ # $FreeBSD: src/gnu/lib/Makefile,v 1.25.2.4 2001/01/06 23:16:53 obrien Exp $ -# $DragonFly: src/gnu/lib/gcc2/Attic/Makefile,v 1.2 2004/01/30 02:35:01 dillon Exp $ +# $DragonFly: src/gnu/lib/gcc2/Attic/Makefile,v 1.3 2004/03/20 16:27:39 drhodus Exp $ # # GCC2 libraries must be built with GCC2. If make does not support .makeenv # we have to hack it by changing ${MAKE} SUBDIR= csu libgcc -.if ${OBJFORMAT} == aout -.if !defined(NOLIBC_R) -SUBDIR+= libgcc_r -.endif -.endif - .if !defined(NO_CXX) SUBDIR+= libstdc++ .endif diff --git a/gnu/lib/gcc2/libgcc/Makefile b/gnu/lib/gcc2/libgcc/Makefile index d839afd3b6..599cb32ff3 100644 --- a/gnu/lib/gcc2/libgcc/Makefile +++ b/gnu/lib/gcc2/libgcc/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/lib/libgcc/Makefile,v 1.31.2.2 2002/06/20 23:13:29 obrien Exp $ -# $DragonFly: src/gnu/lib/gcc2/libgcc/Attic/Makefile,v 1.1 2004/01/16 07:45:19 dillon Exp $ +# $DragonFly: src/gnu/lib/gcc2/libgcc/Attic/Makefile,v 1.2 2004/03/20 16:27:39 drhodus Exp $ GCCDIR= ${.CURDIR}/../../../../contrib/gcc @@ -10,11 +10,6 @@ GCCDIR= ${.CURDIR}/../../../../contrib/gcc LIB= gcc .endif -.if ${OBJFORMAT} == aout -# Install libgcc_pic.a, since ld.so uses it. -INSTALL_PIC_ARCHIVE= yes -.endif - # # XXX This is a hack, but it seems to work. libgcc1.a is supposed to be # compiled by the native compiler, and libgcc2.a is meant to be compiled @@ -62,9 +57,7 @@ SRCS= frame.c tinfo.cc tinfo2.cc new.cc exception.cc CFLAGS+= -fexceptions CFLAGS+= -DIN_GCC -.if ${OBJFORMAT} != aout CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK -.endif CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. CXXFLAGS+= -I${GCCDIR}/cp/inc CXXFLAGS+= -nostdinc++ diff --git a/gnu/usr.bin/gzip/Makefile b/gnu/usr.bin/gzip/Makefile index 75df75e1fa..00bffbf085 100644 --- a/gnu/usr.bin/gzip/Makefile +++ b/gnu/usr.bin/gzip/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 5.3 (Berkeley) 5/12/90 # $FreeBSD: src/gnu/usr.bin/gzip/Makefile,v 1.21.2.2 2001/04/25 14:04:12 ru Exp $ -# $DragonFly: src/gnu/usr.bin/gzip/Attic/Makefile,v 1.2 2003/06/17 04:25:46 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/gzip/Attic/Makefile,v 1.3 2004/03/20 16:27:39 drhodus Exp $ PROG= gzip SRCS= gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c \ @@ -32,7 +32,7 @@ MLINKS+= zgrep.1 zfgrep.1 zgrep.1 zegrep.1 .endif match.o: ${.CURDIR}/match.S - $(CC) -E -traditional ${.CURDIR}/match.S >_match.s + $(CC) -E -DNO_UNDERLINE -traditional ${.CURDIR}/match.S >_match.s $(CC) -c _match.s mv -f _match.o match.o rm -f _match.s diff --git a/gnu/usr.bin/gzip/match.S b/gnu/usr.bin/gzip/match.S index f48ebd5962..7b08457735 100644 --- a/gnu/usr.bin/gzip/match.S +++ b/gnu/usr.bin/gzip/match.S @@ -10,12 +10,12 @@ */ /* $FreeBSD: src/gnu/usr.bin/gzip/match.S,v 1.7 1999/08/27 23:35:52 peter Exp $ */ -/* $DragonFly: src/gnu/usr.bin/gzip/Attic/match.S,v 1.2 2003/06/17 04:25:46 dillon Exp $ */ +/* $DragonFly: src/gnu/usr.bin/gzip/Attic/match.S,v 1.3 2004/03/20 16:27:39 drhodus Exp $ */ /* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix * external symbols with an underline character '_'. */ -#ifdef __ELF__ /* NO_UNDERLINE */ +#ifdef NO_UNDERLINE # define _prev prev # define _window window # define _match_start match_start diff --git a/lib/Makefile b/lib/Makefile index 0651bec36d..1e29ebf217 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD: src/lib/Makefile,v 1.107.2.16 2002/10/10 19:24:35 kbyanc Exp $ -# $DragonFly: src/lib/Makefile,v 1.5 2004/02/02 05:43:13 dillon Exp $ +# $DragonFly: src/lib/Makefile,v 1.6 2004/03/20 16:27:39 drhodus Exp $ # To satisfy shared library or ELF linkage when only the libraries being # built are visible: @@ -31,8 +31,8 @@ SUBDIR= ${_csu} libcom_err libcrypt msun libmd \ ${_libsmutil} \ libstand ${_libtelnet} libusbhid ${_libvgl} libwrap libxpg4 liby libz -.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-${OBJFORMAT}) -_csu=csu/${MACHINE_ARCH}-${OBJFORMAT} +.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) +_csu=csu/${MACHINE_ARCH}-elf .elif exists(${.CURDIR}/csu/${MACHINE_ARCH}) _csu=csu/${MACHINE_ARCH} .endif diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index 1a2fffbffd..d5ae86daeb 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -24,17 +24,9 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/gen/dlfcn.c,v 1.6.2.1 2003/02/20 20:42:45 kan Exp $ - * $DragonFly: src/lib/libc/gen/dlfcn.c,v 1.2 2003/06/17 04:26:42 dillon Exp $ + * $DragonFly: src/lib/libc/gen/dlfcn.c,v 1.3 2004/03/20 16:27:39 drhodus Exp $ */ -/* - * Linkage to services provided by the dynamic linker. These are - * implemented differently in ELF and a.out, because the dynamic - * linkers have different interfaces. - */ - -#ifdef __ELF__ - #include #include @@ -116,76 +108,3 @@ dlinfo(void *handle, int request, void *p) _rtld_error(sorry); return NULL; } - -#else /* a.out format */ - -#include -#include /* XXX - Required by link.h */ -#include -#include -#include - -/* - * For a.out, entry to the dynamic linker is via these trampolines. - * They enter the dynamic linker through the ld_entry struct that was - * passed back from the dynamic linker at startup time. - */ - -/* GCC is needed because we use its __builtin_return_address construct. */ - -#ifndef __GNUC__ -#error "GCC is needed to compile this file" -#endif - -/* - * These variables are set by code in crt0.o. For compatibility with - * old executables, they must be common, not extern. - */ -struct ld_entry *__ldso_entry; /* Entry points to dynamic linker */ -int __ldso_version; /* Dynamic linker version number */ - -int -dladdr(const void *addr, Dl_info *dlip) -{ - if (__ldso_entry == NULL || __ldso_version < LDSO_VERSION_HAS_DLADDR) - return 0; - return (__ldso_entry->dladdr)(addr, dlip); -} - -int -dlclose(void *handle) -{ - if (__ldso_entry == NULL) - return -1; - return (__ldso_entry->dlclose)(handle); -} - -const char * -dlerror(void) -{ - if (__ldso_entry == NULL) - return "Service unavailable"; - return (__ldso_entry->dlerror)(); -} - -void * -dlopen(const char *name, int mode) -{ - if (__ldso_entry == NULL) - return NULL; - return (__ldso_entry->dlopen)(name, mode); -} - -void * -dlsym(void *handle, const char *name) -{ - if (__ldso_entry == NULL) - return NULL; - if (__ldso_version >= LDSO_VERSION_HAS_DLSYM3) { - void *retaddr = __builtin_return_address(0); /* __GNUC__ only */ - return (__ldso_entry->dlsym3)(handle, name, retaddr); - } else - return (__ldso_entry->dlsym)(handle, name); -} - -#endif /* __ELF__ */ diff --git a/lib/libc/gen/getobjformat.c b/lib/libc/gen/getobjformat.c index 6f45173702..f990e354d9 100644 --- a/lib/libc/gen/getobjformat.c +++ b/lib/libc/gen/getobjformat.c @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2004 David Rhodus * Copyright (c) 1998 John D. Polstra * All rights reserved. * @@ -24,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/gen/getobjformat.c,v 1.3 1999/12/18 04:47:43 obrien Exp $ - * $DragonFly: src/lib/libc/gen/getobjformat.c,v 1.2 2003/06/17 04:26:42 dillon Exp $ + * $DragonFly: src/lib/libc/gen/getobjformat.c,v 1.3 2004/03/20 16:27:39 drhodus Exp $ */ #include @@ -33,88 +34,12 @@ #include #include -#define PATH_OBJFORMAT "/etc/objformat" - -static int copyformat(char *, const char *, size_t); - -static const char *known_formats[] = { OBJFORMAT_NAMES, NULL }; - -static int -copyformat(char *buf, const char *fmt, size_t bufsize) -{ - size_t len; - - len = strlen(fmt); - if (len > bufsize - 1) - return -1; - strcpy(buf, fmt); - return len; -} - int getobjformat(char *buf, size_t bufsize, int *argcp, char **argv) { - const char *fmt; - char **src, **dst; - const char *env; - FILE *fp; - - fmt = NULL; - - if (argv != NULL) { - /* - * Scan for arguments setting known formats, e.g., "-elf". - * If "argcp" is non-NULL, delete these arguments from the - * list and update the argument count in "*argcp". - */ - for (dst = src = argv; *src != NULL; src++) { - if ((*src)[0] == '-') { - const char **p; - - for (p = known_formats; *p != NULL; p++) - if (strcmp(*src + 1, *p) == 0) - break; - if (*p != NULL) { - fmt = *p; - if (argcp == NULL) /* Don't delete */ - *dst++ = *src; - } else - *dst++ = *src; - } else - *dst++ = *src; - } - *dst = NULL; - if (argcp != NULL) - *argcp -= src - dst; - if (fmt != NULL) - return copyformat(buf, fmt, bufsize); - } - - /* Check the OBJFORMAT environment variable. */ - if ((env = getenv("OBJFORMAT")) != NULL) - return copyformat(buf, env, bufsize); - - /* Take a look at "/etc/objformat". */ - if ((fp = fopen(PATH_OBJFORMAT, "r")) != NULL) { - char line[1024]; - int found; - int len; - - found = len = 0; - while (fgets(line, sizeof line, fp) != NULL) { - if (strncmp(line, "OBJFORMAT=", 10) == 0) { - char *p = &line[10]; - - p[strcspn(p, " \t\n")] = '\0'; - len = copyformat(buf, p, bufsize); - found = 1; - } - } - fclose(fp); - if (found) - return len; - } - /* As a last resort, use the compiled in default. */ - return copyformat(buf, OBJFORMAT_DEFAULT, bufsize); + if (bufsize < 4) + return -1; + strcpy(buf, "elf"); + return 3; } diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c index f7cc5428a8..cd38beb036 100644 --- a/lib/libc/gmon/gmon.c +++ b/lib/libc/gmon/gmon.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/gmon/gmon.c,v 1.8 2000/01/27 23:06:25 jasone Exp $ - * $DragonFly: src/lib/libc/gmon/gmon.c,v 1.3 2003/11/12 20:21:24 eirikn Exp $ + * $DragonFly: src/lib/libc/gmon/gmon.c,v 1.4 2004/03/20 16:27:40 drhodus Exp $ * * @(#)gmon.c 8.1 (Berkeley) 6/4/93 */ @@ -47,7 +47,7 @@ #include #include -#if defined(__ELF__) && defined(i386) +#if defined(__i386__) || defined(__amd64__) extern char *minbrk asm (".minbrk"); #else extern char *minbrk asm ("minbrk"); diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index c33f5eb3c1..eabe258a6c 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -36,7 +36,7 @@ * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 * * $FreeBSD: src/lib/libc/i386/SYS.h,v 1.17.2.2 2002/10/15 19:46:46 fjoe Exp $ - * $DragonFly: src/lib/libc/i386/SYS.h,v 1.2 2003/06/17 04:26:42 dillon Exp $ + * $DragonFly: src/lib/libc/i386/SYS.h,v 1.3 2004/03/20 16:27:40 drhodus Exp $ */ #include @@ -88,8 +88,4 @@ #define PPSEUDO(x,y) PSEUDO(x,y) #endif -#ifdef __ELF__ -#define KERNCALL int $0x80 /* Faster */ -#else -#define KERNCALL LCALL(7,0) /* The old way */ -#endif +#define KERNCALL int $0x80 diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile index 995a8bffcc..af92c7506e 100644 --- a/lib/libmd/Makefile +++ b/lib/libmd/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/lib/libmd/Makefile,v 1.34.2.2 2002/07/17 15:16:38 ru Exp $ -# $DragonFly: src/lib/libmd/Makefile,v 1.2 2003/06/17 04:26:50 dillon Exp $ +# $DragonFly: src/lib/libmd/Makefile,v 1.3 2004/03/20 16:27:40 drhodus Exp $ LIB= md SRCS= md2c.c md4c.c md5c.c md2hl.c md4hl.c md5hl.c \ @@ -27,7 +27,6 @@ CLEANFILES+= md[245]hl.c md[245].ref md[245].3 mddriver \ CFLAGS+= -I${.CURDIR} .PATH: ${.CURDIR}/${MACHINE_ARCH} -.if ${OBJFORMAT} == "elf" .if exists(${MACHINE_ARCH}/sha.S) SRCS+= sha.S CFLAGS+= -DSHA1_ASM -DELF @@ -36,7 +35,6 @@ CFLAGS+= -DSHA1_ASM -DELF SRCS+= rmd160.S CFLAGS+= -DRMD160_ASM -DELF .endif -.endif md2hl.c: mdXhl.c (echo '#define LENGTH 16'; \ diff --git a/lib/libncurses/Makefile b/lib/libncurses/Makefile index b630043a0a..e190522b86 100644 --- a/lib/libncurses/Makefile +++ b/lib/libncurses/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/lib/libncurses/Makefile,v 1.39.2.13 2002/08/07 16:31:48 ru Exp $ -# $DragonFly: src/lib/libncurses/Makefile,v 1.2 2003/06/17 04:26:50 dillon Exp $ +# $DragonFly: src/lib/libncurses/Makefile,v 1.3 2004/03/20 16:27:40 drhodus Exp $ NCURSES=${.CURDIR}/../../contrib/ncurses @@ -223,18 +223,6 @@ SYMLINKS+=libncurses.a ${LIBDIR}/libtermlib.a SYMLINKS+=libncurses.a ${LIBDIR}/libmytinfo.a SYMLINKS+=libncurses.a ${LIBDIR}/libtinfo.a .if !defined(NOPIC) -.if ${OBJFORMAT} == aout -SYMLINKS+=libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - libcurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} -SYMLINKS+=libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} -SYMLINKS+=libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR} -SYMLINKS+=libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - libmytinfo.so.${SHLIB_MAJOR}.${SHLIB_MINOR} -SYMLINKS+=libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - libtinfo.so.${SHLIB_MAJOR}.${SHLIB_MINOR} -.else # no need for major at all, it's an ld-time redirection only SYMLINKS+=libncurses.so ${SHLIBDIR}/libcurses.so SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermcap.so @@ -242,7 +230,6 @@ SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermlib.so SYMLINKS+=libncurses.so ${SHLIBDIR}/libmytinfo.so SYMLINKS+=libncurses.so ${SHLIBDIR}/libtinfo.so .endif -.endif .if !defined(NOPROFILE) SYMLINKS+=libncurses_p.a ${LIBDIR}/libcurses_p.a SYMLINKS+=libncurses_p.a ${LIBDIR}/libtermcap_p.a diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile index 9b0e0e9120..03efa33f0f 100644 --- a/lib/libpam/libpam/Makefile +++ b/lib/libpam/libpam/Makefile @@ -23,7 +23,7 @@ # SUCH DAMAGE. # # $FreeBSD: src/lib/libpam/libpam/Makefile,v 1.12.2.12 2002/07/22 14:21:49 ru Exp $ -# $DragonFly: src/lib/libpam/libpam/Attic/Makefile,v 1.4 2003/11/10 06:14:44 dillon Exp $ +# $DragonFly: src/lib/libpam/libpam/Attic/Makefile,v 1.5 2004/03/20 16:27:40 drhodus Exp $ PAMDIR= ${.CURDIR}/../../../contrib/libpam MODOBJDIR= ../modules @@ -83,7 +83,6 @@ _EXTRADEPEND: pam_static.c ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BID]*} \ ${.ALLSRC} -.if ${OBJFORMAT} == elf CLEANFILES+= _pam_static_modules.o pam_static_modules.o: pam_static.o _pam_static_modules.o @@ -91,10 +90,6 @@ pam_static_modules.o: pam_static.o _pam_static_modules.o _pam_static_modules.o: ${STATIC_MODULES} ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC} -.else -pam_static_modules.o: pam_static.o ${STATIC_MODULES} - ${LD} -o ${.TARGET} -r -Bforcearchive ${.ALLSRC} -.endif # Headers INCS= ${HDRS1:S;^;${PAMDIR}/libpam/include/security/;} \ diff --git a/lib/liby/Makefile b/lib/liby/Makefile index 5cc2bf756c..67fb03af8b 100644 --- a/lib/liby/Makefile +++ b/lib/liby/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/lib/liby/Makefile,v 1.7 1999/08/28 00:05:59 peter Exp $ -# $DragonFly: src/lib/liby/Makefile,v 1.2 2003/06/17 04:26:52 dillon Exp $ +# $DragonFly: src/lib/liby/Makefile,v 1.3 2004/03/20 16:27:40 drhodus Exp $ LIB= y SHLIB_MAJOR= 2 @@ -7,31 +7,6 @@ SHLIB_MINOR= 0 SRCS= main.c yyerror.c -.if ${OBJFORMAT} != aout NOPIC= true -.endif - -# -# Before complaining about this, please *double-check* that you have -# updated the ldconfig path in /etc/rc to include /usr/lib/compat that -# was added in src/etc/rc rev 1.98. -# This is so that `ld' will not continue to generate binaries linked -# shared against liby, so that in a future release we can move this -# off to a compat dist (like compat22). -# -beforeinstall: - rm -f ${DESTDIR}/usr/lib/compat/lib${LIB}.so \ - ${DESTDIR}${ORIG_SHLIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - ${DESTDIR}/usr/lib/compat/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - ${DESTDIR}/usr/lib/compat/lib${LIB}.so.${SHLIB_MAJOR} .include - -# This must follow the .include in case SHLIBDIR is defined there. -ORIG_SHLIBDIR:= ${SHLIBDIR} - -.if ${OBJFORMAT} == aout -# The ldconfig line in/etc/rc doesn't depend on ${LIBDIR} or ${SHLIBDIR}, -# so neither does this. -SHLIBDIR= /usr/lib/compat/aout -.endif diff --git a/libexec/Makefile b/libexec/Makefile index 9a843cefc3..21fd7c645c 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD: src/libexec/Makefile,v 1.42.2.5 2002/11/12 17:32:48 obrien Exp $ -# $DragonFly: src/libexec/Makefile,v 1.5 2003/08/05 07:45:41 asmodai Exp $ +# $DragonFly: src/libexec/Makefile,v 1.6 2004/03/20 16:27:40 drhodus Exp $ # Present but disabled: kpasswdd SUBDIR= atrun \ @@ -23,6 +23,7 @@ SUBDIR= atrun \ rpc.rwalld \ rpc.sprayd \ rshd \ + rtld-elf \ talkd \ tcpd \ tftpd \ @@ -37,14 +38,6 @@ SUBDIR+=named-xfer SUBDIR+=mail.local smrsh .endif -.if ${OBJFORMAT} == aout -SUBDIR+=rtld-aout -.endif - -.if ${OBJFORMAT} == elf -SUBDIR+=rtld-elf -.endif - .if defined(RELEASEDIR) || \ !exists(${.CURDIR}/../secure) || defined(NOCRYPT) # make release needs both diff --git a/libexec/rtld-aout/shlib.c b/libexec/rtld-aout/shlib.c index 29375ffdb3..fddd887756 100644 --- a/libexec/rtld-aout/shlib.c +++ b/libexec/rtld-aout/shlib.c @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/libexec/rtld-aout/shlib.c,v 1.22 1999/08/28 00:10:05 peter Exp $ - * $DragonFly: src/libexec/rtld-aout/Attic/shlib.c,v 1.2 2003/06/17 04:27:08 dillon Exp $ + * $DragonFly: src/libexec/rtld-aout/Attic/shlib.c,v 1.3 2004/03/20 16:27:40 drhodus Exp $ */ #include @@ -45,7 +45,7 @@ #include #include -#include +#include #include "shlib.h" #include "support.h" diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index c75b99b6e9..de67294c7e 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -33,12 +33,13 @@ * @(#) Copyright (c) 1983, 1993 The Regents of the University of California. All rights reserved. * @(#)ifconfig.c 8.2 (Berkeley) 2/16/94 * $FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.96 2004/02/27 06:43:14 kan Exp $ - * $DragonFly: src/sbin/ifconfig/ifconfig.c,v 1.9 2004/03/17 09:32:18 dillon Exp $ + * $DragonFly: src/sbin/ifconfig/ifconfig.c,v 1.10 2004/03/20 16:27:40 drhodus Exp $ */ #include #include #include +#include #include #include #include diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index ebb452d46c..891888afbc 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sbin/ldconfig/ldconfig.c,v 1.31.2.3 2001/07/11 23:59:10 obrien Exp $ - * $DragonFly: src/sbin/ldconfig/ldconfig.c,v 1.4 2003/11/01 17:16:00 drhodus Exp $ + * $DragonFly: src/sbin/ldconfig/ldconfig.c,v 1.5 2004/03/20 16:27:40 drhodus Exp $ */ #include @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include @@ -98,17 +98,18 @@ main(int argc, char **argv) { int i, c; int rval = 0; - char objformat[32]; int is_aout; - if (getobjformat(objformat, sizeof objformat, &argc, argv) == -1) - errx(1, "getobjformat failed: name too long"); - if (strcmp(objformat, "aout") == 0) + is_aout = 0; + if (argc > 1 && strcmp(argv[1], "-aout") == 0) { is_aout = 1; - else if (strcmp(objformat, "elf") == 0) - is_aout = 0; - else - errx(1, "unknown object format \"%s\"", objformat); + argc--; + argv++; + } else if (argc > 1 && strcmp(argv[1], "-elf") == 0) { + /* skip over legacy -elf arg */ + argc--; + argv++; + } hints_file = is_aout ? _PATH_LD_HINTS : _PATH_ELF_HINTS; if (argc == 1) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 4d24334085..e2031e5819 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,6 +1,6 @@ # from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 # $FreeBSD: src/share/mk/bsd.lib.mk,v 1.91.2.15 2002/08/07 16:31:50 ru Exp $ -# $DragonFly: src/share/mk/bsd.lib.mk,v 1.4 2004/03/05 01:06:50 joerg Exp $ +# $DragonFly: src/share/mk/bsd.lib.mk,v 1.5 2004/03/20 16:27:41 drhodus Exp $ # .include @@ -13,7 +13,6 @@ .undef SHLIB_NAME .undef INSTALL_PIC_ARCHIVE .else -.if ${OBJFORMAT} == elf .if !defined(SHLIB_NAME) && defined(LIB) && defined(SHLIB_MAJOR) SHLIB_NAME= lib${LIB}.so.${SHLIB_MAJOR} .endif @@ -21,11 +20,6 @@ SHLIB_NAME= lib${LIB}.so.${SHLIB_MAJOR} SHLIB_LINK?= ${SHLIB_NAME:R} .endif SONAME?= ${SHLIB_NAME} -.else -.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR) -SHLIB_NAME?= lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} -.endif -.endif .endif .if defined(DEBUG_FLAGS) @@ -36,9 +30,7 @@ CFLAGS+= ${DEBUG_FLAGS} STRIP?= -s .endif -.if ${OBJFORMAT} != aout || make(checkdpadd) || defined(NEED_LIBNAMES) .include -.endif .if defined(USEGNUDIR) USELIBDIR?=${GCCLIBDIR} USESHLIBDIR?=${GCCSHLIBDIR} @@ -200,16 +192,10 @@ ${SHLIB_NAME}: ${SOBJS} .if defined(SHLIB_LINK) @ln -fs ${.TARGET} ${SHLIB_LINK} .endif -.if ${OBJFORMAT} == aout - @${CC} -shared -Wl,-x,-assert,pure-text \ - -o ${.TARGET} \ - `lorder ${SOBJS} | tsort -q` ${LDADD} -.else @${CC} ${LDFLAGS} -shared -Wl,-x \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `lorder ${SOBJS} | tsort -q` ${LDADD} .endif -.endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) _LIBS+= lib${LIB}_pic.a @@ -235,16 +221,10 @@ _EXTRADEPEND: > $$TMP; \ mv $$TMP ${DEPENDFILE} .if !defined(NOEXTRADEPEND) && defined(SHLIB_NAME) -.if ${OBJFORMAT} == aout - echo ${SHLIB_NAME}: \ - `${CC} -shared -Wl,-f ${LDADD}` \ - >> ${DEPENDFILE} -.else .if defined(DPADD) && !empty(DPADD) echo ${SHLIB_NAME}: ${DPADD} >> ${DEPENDFILE} .endif .endif -.endif .if !target(install) diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index f4373499fd..1128d28938 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.own.mk,v 1.27.2.4 2002/07/22 14:21:51 ru Exp $ -# $DragonFly: src/share/mk/bsd.own.mk,v 1.7 2004/01/30 02:35:02 dillon Exp $ +# $DragonFly: src/share/mk/bsd.own.mk,v 1.8 2004/03/20 16:27:41 drhodus Exp $ # # The include file set common variables for owner, # group, mode, and directories. Defaults are in brackets. @@ -29,9 +29,6 @@ # own install script so that the entire system can be made # stripped/not-stripped using a single knob. [-s] # -# OBJFORMAT Default object format that selects which set of tools to run. -# [elf] -# # BINOWN Binary owner. [root] # # BINGRP Binary group. [wheel] @@ -135,11 +132,7 @@ KMODOWN?= ${BINOWN} KMODGRP?= ${BINGRP} KMODMODE?= ${BINMODE} -.if defined(OBJFORMAT) && ${OBJFORMAT} == aout -LIBDIR?= /usr/lib/aout -.else LIBDIR?= /usr/lib -.endif GCCLIBDIR?= ${LIBDIR}/${CCVER} LIBCOMPATDIR?= /usr/lib/compat LIBDATADIR?= /usr/libdata diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 923affa5e0..1a8c754e7e 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,6 +1,6 @@ # from: @(#)sys.mk 8.2 (Berkeley) 3/21/94 # $FreeBSD: src/share/mk/sys.mk,v 1.45.2.6 2002/12/23 16:33:37 ru Exp $ -# $DragonFly: src/share/mk/sys.mk,v 1.4 2004/01/28 19:24:09 dillon Exp $ +# $DragonFly: src/share/mk/sys.mk,v 1.5 2004/03/20 16:27:41 drhodus Exp $ unix ?= We run FreeBSD, not UNIX. @@ -256,14 +256,6 @@ __MAKE_CONF?=/etc/make.conf .include .endif -# -# The build tools are indirected by /usr/bin/objformat which determines the -# object format from the OBJFORMAT environment variable and if this is not -# defined, it reads /etc/objformat. -# -.if exists(/etc/objformat) && !defined(OBJFORMAT) -.include "/etc/objformat" -.endif - # Default executable format +# XXX hint for bsd.port.mk OBJFORMAT?= elf diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 16f3017c36..51788165c5 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -1,6 +1,6 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 # $FreeBSD: src/sys/conf/kmod.mk,v 1.82.2.15 2003/02/10 13:11:50 nyan Exp $ -# $DragonFly: src/sys/conf/kmod.mk,v 1.12 2004/03/18 18:47:39 dillon Exp $ +# $DragonFly: src/sys/conf/kmod.mk,v 1.13 2004/03/20 16:27:41 drhodus Exp $ # # The include file handles installing Kernel Loadable Device # drivers (KLD's). @@ -98,11 +98,6 @@ CFLAGS+= -I@/../include -I${DESTDIR}/usr/include CFLAGS+= ${DEBUG_FLAGS} -.if ${OBJFORMAT} == elf -CLEANFILES+= setdef0.c setdef1.c setdefs.h -CLEANFILES+= setdef0.o setdef1.o -.endif - OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .if !defined(PROG) diff --git a/sys/cpu/i386/include/asm.h b/sys/cpu/i386/include/asm.h index 0bce7afc1d..9dba110909 100644 --- a/sys/cpu/i386/include/asm.h +++ b/sys/cpu/i386/include/asm.h @@ -35,7 +35,7 @@ * * from: @(#)DEFS.h 5.1 (Berkeley) 4/23/90 * $FreeBSD: src/sys/i386/include/asm.h,v 1.7 2000/01/25 09:01:55 bde Exp $ - * $DragonFly: src/sys/cpu/i386/include/asm.h,v 1.2 2003/06/17 04:28:35 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/asm.h,v 1.3 2004/03/20 16:27:41 drhodus Exp $ */ #ifndef _MACHINE_ASM_H_ @@ -70,13 +70,8 @@ * language name. HIDENAME is given an assembly-language name, and expands * to a possibly-modified form that will be invisible to C programs. */ -#ifdef __ELF__ #define CNAME(csym) csym #define HIDENAME(asmsym) __CONCAT(.,asmsym) -#else -#define CNAME(csym) __CONCAT(_,csym) -#define HIDENAME(asmsym) asmsym -#endif /* XXX should use .p2align 4,0x90 for -m486. */ #define _START_ENTRY .text; .p2align 2,0x90 diff --git a/sys/cpu/i386/include/param.h b/sys/cpu/i386/include/param.h index 16acadfed5..9e159af6f3 100644 --- a/sys/cpu/i386/include/param.h +++ b/sys/cpu/i386/include/param.h @@ -35,7 +35,7 @@ * * from: @(#)param.h 5.8 (Berkeley) 6/28/91 * $FreeBSD: src/sys/i386/include/param.h,v 1.54.2.8 2002/08/31 21:15:55 dillon Exp $ - * $DragonFly: src/sys/cpu/i386/include/param.h,v 1.6 2003/11/03 17:11:19 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/param.h,v 1.7 2004/03/20 16:27:41 drhodus Exp $ */ #ifndef _MACHINE_PARAM_H_ @@ -85,13 +85,6 @@ #endif #define MID_MACHINE MID_I386 -/* - * OBJFORMAT_NAMES is a comma-separated list of the object formats - * that are supported on the architecture. - */ -#define OBJFORMAT_NAMES "elf", "aout" -#define OBJFORMAT_DEFAULT "elf" - /* * Use SMP_MAXCPU instead of MAXCPU for structures that are intended to * remain compatible between UP and SMP builds. diff --git a/sys/cpu/i386/include/profile.h b/sys/cpu/i386/include/profile.h index 20bb09f33e..eb8787cc99 100644 --- a/sys/cpu/i386/include/profile.h +++ b/sys/cpu/i386/include/profile.h @@ -32,7 +32,7 @@ * * @(#)profile.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/profile.h,v 1.20 1999/12/29 04:33:05 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/profile.h,v 1.4 2003/08/26 21:42:18 rob Exp $ + * $DragonFly: src/sys/cpu/i386/include/profile.h,v 1.5 2004/03/20 16:27:41 drhodus Exp $ */ #ifndef _MACHINE_PROFILE_H_ @@ -136,11 +136,7 @@ void stopguprof (struct gmonparam *p); __BEGIN_DECLS #ifdef __GNUC__ -#ifdef __ELF__ void mcount (void) __asm(".mcount"); -#else -void mcount (void) __asm("mcount"); -#endif #endif static void _mcount (uintfptr_t frompc, uintfptr_t selfpc); __END_DECLS diff --git a/sys/i386/include/asm.h b/sys/i386/include/asm.h index f4f46f5c49..2e6f350653 100644 --- a/sys/i386/include/asm.h +++ b/sys/i386/include/asm.h @@ -35,7 +35,7 @@ * * from: @(#)DEFS.h 5.1 (Berkeley) 4/23/90 * $FreeBSD: src/sys/i386/include/asm.h,v 1.7 2000/01/25 09:01:55 bde Exp $ - * $DragonFly: src/sys/i386/include/Attic/asm.h,v 1.2 2003/06/17 04:28:35 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/asm.h,v 1.3 2004/03/20 16:27:41 drhodus Exp $ */ #ifndef _MACHINE_ASM_H_ @@ -70,13 +70,8 @@ * language name. HIDENAME is given an assembly-language name, and expands * to a possibly-modified form that will be invisible to C programs. */ -#ifdef __ELF__ #define CNAME(csym) csym #define HIDENAME(asmsym) __CONCAT(.,asmsym) -#else -#define CNAME(csym) __CONCAT(_,csym) -#define HIDENAME(asmsym) asmsym -#endif /* XXX should use .p2align 4,0x90 for -m486. */ #define _START_ENTRY .text; .p2align 2,0x90 diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h index e9fe0d73c0..0d20a037b7 100644 --- a/sys/i386/include/param.h +++ b/sys/i386/include/param.h @@ -35,7 +35,7 @@ * * from: @(#)param.h 5.8 (Berkeley) 6/28/91 * $FreeBSD: src/sys/i386/include/param.h,v 1.54.2.8 2002/08/31 21:15:55 dillon Exp $ - * $DragonFly: src/sys/i386/include/Attic/param.h,v 1.6 2003/11/03 17:11:19 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/param.h,v 1.7 2004/03/20 16:27:41 drhodus Exp $ */ #ifndef _MACHINE_PARAM_H_ @@ -85,13 +85,6 @@ #endif #define MID_MACHINE MID_I386 -/* - * OBJFORMAT_NAMES is a comma-separated list of the object formats - * that are supported on the architecture. - */ -#define OBJFORMAT_NAMES "elf", "aout" -#define OBJFORMAT_DEFAULT "elf" - /* * Use SMP_MAXCPU instead of MAXCPU for structures that are intended to * remain compatible between UP and SMP builds. diff --git a/sys/i386/include/profile.h b/sys/i386/include/profile.h index 8246dffe81..3f4963f7a5 100644 --- a/sys/i386/include/profile.h +++ b/sys/i386/include/profile.h @@ -32,7 +32,7 @@ * * @(#)profile.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/profile.h,v 1.20 1999/12/29 04:33:05 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/profile.h,v 1.4 2003/08/26 21:42:18 rob Exp $ + * $DragonFly: src/sys/i386/include/Attic/profile.h,v 1.5 2004/03/20 16:27:41 drhodus Exp $ */ #ifndef _MACHINE_PROFILE_H_ @@ -136,11 +136,7 @@ void stopguprof (struct gmonparam *p); __BEGIN_DECLS #ifdef __GNUC__ -#ifdef __ELF__ void mcount (void) __asm(".mcount"); -#else -void mcount (void) __asm("mcount"); -#endif #endif static void _mcount (uintfptr_t frompc, uintfptr_t selfpc); __END_DECLS diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index fe88bcda12..58cfbe4130 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/link_elf.c,v 1.24 1999/12/24 15:33:36 bde Exp $ - * $DragonFly: src/sys/kern/link_elf.c,v 1.12 2004/03/01 06:33:17 dillon Exp $ + * $DragonFly: src/sys/kern/link_elf.c,v 1.13 2004/03/20 16:27:41 drhodus Exp $ */ #include @@ -128,12 +128,10 @@ extern struct _dynamic _DYNAMIC; static void link_elf_init(void* arg) { -#ifdef __ELF__ Elf_Dyn *dp; caddr_t modptr, baseptr, sizeptr; elf_file_t ef; char *modname; -#endif #if ELF_TARG_CLASS == ELFCLASS32 linker_add_class("elf32", NULL, &link_elf_class_ops); @@ -141,7 +139,6 @@ link_elf_init(void* arg) linker_add_class("elf64", NULL, &link_elf_class_ops); #endif -#ifdef __ELF__ dp = (Elf_Dyn*) &_DYNAMIC; if (dp) { ef = malloc(sizeof(struct elf_file), M_LINKER, M_NOWAIT); @@ -180,7 +177,6 @@ link_elf_init(void* arg) linker_current_file = linker_kernel_file; linker_kernel_file->flags |= LINKER_FILE_LINKED; } -#endif } SYSINIT(link_elf, SI_SUB_KLD, SI_ORDER_SECOND, link_elf_init, 0); diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index b9930879b0..f887a0d6bc 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -35,7 +35,7 @@ * * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/cdefs.h,v 1.28.2.8 2002/09/18 04:05:13 mikeh Exp $ - * $DragonFly: src/sys/sys/cdefs.h,v 1.9 2004/03/13 12:39:56 joerg Exp $ + * $DragonFly: src/sys/sys/cdefs.h,v 1.10 2004/03/20 16:27:41 drhodus Exp $ */ #ifndef _SYS_CDEFS_H_ @@ -284,7 +284,6 @@ #ifdef __GNUC__ #define __strong_reference(sym,aliassym) \ extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))); -#ifdef __ELF__ #ifdef __STDC__ #define __weak_reference(sym,alias) \ __asm__(".weak " #alias); \ @@ -302,29 +301,10 @@ __asm__(".asciz \"msg\""); \ __asm__(".previous") #endif /* __STDC__ */ -#else /* !__ELF__ */ -#ifdef __STDC__ -#define __weak_reference(sym,alias) \ - __asm__(".stabs \"_" #alias "\",11,0,0,0"); \ - __asm__(".stabs \"_" #sym "\",1,0,0,0") -#define __warn_references(sym,msg) \ - __asm__(".stabs \"" msg "\",30,0,0,0"); \ - __asm__(".stabs \"_" #sym "\",1,0,0,0") -#else -#define __weak_reference(sym,alias) \ - __asm__(".stabs \"_/**/alias\",11,0,0,0"); \ - __asm__(".stabs \"_/**/sym\",1,0,0,0") -#define __warn_references(sym,msg) \ - __asm__(".stabs msg,30,0,0,0"); \ - __asm__(".stabs \"_/**/sym\",1,0,0,0") -#endif /* __STDC__ */ -#endif /* __ELF__ */ #endif /* __GNUC__ */ -#if defined(__GNUC__) && defined(__ELF__) +#if defined(__GNUC__) #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") -#else -#define __IDSTRING(name,string) static const char name[] __unused = string #endif #ifndef __RCSID diff --git a/tools/tools/kernxref/kernxref.sh b/tools/tools/kernxref/kernxref.sh index 44a8e314e1..a3b5619541 100644 --- a/tools/tools/kernxref/kernxref.sh +++ b/tools/tools/kernxref/kernxref.sh @@ -8,7 +8,7 @@ # ---------------------------------------------------------------------------- # # $FreeBSD: src/tools/tools/kernxref/kernxref.sh,v 1.13 1999/08/28 00:54:30 peter Exp $ -# $DragonFly: src/tools/tools/kernxref/kernxref.sh,v 1.2 2003/06/17 04:29:11 dillon Exp $ +# $DragonFly: src/tools/tools/kernxref/kernxref.sh,v 1.3 2004/03/20 16:27:41 drhodus Exp $ # # This shellscript will make a cross reference of the symbols of the LINT # kernel. @@ -17,13 +17,8 @@ COMPILEDIR=/sys/compile KERNELNAME=LINT cd ${COMPILEDIR}/${KERNELNAME} -if file vers.o | grep -q ELF; then - OBJFORMAT=elf; -else - OBJFORMAT=aout; -fi -OBJFORMAT=${OBJFORMAT} nm -gon `echo *.o /modules/*.ko \ +nm -gon `echo *.o /boot/kernel/*.ok \ | tr ' ' '\012' \ | egrep -v '(aicasm|genassym)'` \ | tr : ' ' | awk ' diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 2a70b913af..c3cca1dc68 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,6 +1,6 @@ # From: @(#)Makefile 8.3 (Berkeley) 1/7/94 # $FreeBSD: src/usr.bin/Makefile,v 1.144.2.17 2003/01/04 17:17:07 obrien Exp $ -# $DragonFly: src/usr.bin/Makefile,v 1.9 2004/01/31 08:56:13 dillon Exp $ +# $DragonFly: src/usr.bin/Makefile,v 1.10 2004/03/20 16:27:41 drhodus Exp $ # XXX MISSING: deroff diction graph learn plot # spell spline struct xsend @@ -226,19 +226,13 @@ SUBDIR+=vacation .if ${MACHINE_ARCH} == "i386" # Things that don't compile on alpha or are aout specific: -SUBDIR+=ar \ - doscmd \ +SUBDIR+=doscmd \ gcore \ gprof4 \ ncplist \ ncplogin \ - nm \ - ranlib \ sasc \ - size \ - smbutil \ - strings \ - strip + smbutil .endif .if ${MACHINE_ARCH} == "alpha" diff --git a/usr.bin/doscmd/Makefile b/usr.bin/doscmd/Makefile index 6f64bc526d..f51c2fd7af 100644 --- a/usr.bin/doscmd/Makefile +++ b/usr.bin/doscmd/Makefile @@ -1,7 +1,7 @@ # from BSDI Makefile,v 2.6 1996/04/08 20:06:40 bostic Exp # # $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.21.2.5 2002/08/07 16:32:01 ru Exp $ -# $DragonFly: src/usr.bin/doscmd/Makefile,v 1.2 2003/06/17 04:29:25 dillon Exp $ +# $DragonFly: src/usr.bin/doscmd/Makefile,v 1.3 2004/03/20 16:27:41 drhodus Exp $ PROG= doscmd SRCS= AsyncIO.c ParseBuffer.c bios.c callback.c cmos.c config.c cpu.c cwd.c \ @@ -15,14 +15,7 @@ FONTHDRS= font8x8.h font8x14.h font8x16.h CLEANFILES= ${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com XINCDIR= ${DESTDIR}${X11BASE}/include -.if ${OBJFORMAT} == "aout" -CLEANFILES+= doscmd.kernel crt0.o doscmd_loader.o -XLIBDIR= ${DESTDIR}${X11BASE}/lib/aout -LDADD= -L${DESTDIR}${LIBDIR} -lgcc -lc -DPADD= ${LIBGCC} ${LIBC} -.else XLIBDIR= ${DESTDIR}${X11BASE}/lib -.endif EXEGRP:= ${BINGRP} EXEMODE= ${NOBINMODE} @@ -38,10 +31,6 @@ CFLAGS+= -DNO_X .endif beforeinstall: -.if ${OBJFORMAT} == "aout" - ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \ - doscmd.kernel ${DESTDIR}/usr/libexec/ -.endif ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \ emsdriv.sys redir.com ${DESTDIR}/usr/libdata/doscmd/ ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \ @@ -50,19 +39,7 @@ beforeinstall: ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \ fonts.dir ${DESTDIR}/usr/libdata/doscmd/fonts -.if ${OBJFORMAT} == "aout" -doscmd: ${LIBCRT0} doscmd_loader.o ${LIBGCC} ${LIBC} - ${CC} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-e,start,-dc,-dp \ - -o doscmd ${LIBCRT0} doscmd_loader.o -lgcc -lc - -# Bogusly generated dependency to get doscmd_loader.c looked at by mkdep. -.depend: doscmd_loader.c - -# Bogus dependencies to get more than one binary created by `make all'. -doscmd: ${FONTFILES} ${FONTHDRS} doscmd.kernel emsdriv.sys redir.com -.else doscmd: ${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com -.endif cp437-8x8.pcf.gz: cp437-8x8.pcf.gz.uu uudecode ${.CURDIR}/cp437-8x8.pcf.gz.uu @@ -97,11 +74,3 @@ redir.com: redir.com.uu NEED_LIBNAMES= yes .include - -.if ${OBJFORMAT} == "aout" -# This must be after bsd.prog.mk is included so that ${OBJS} in the -# dependency gets expanded. -doscmd.kernel: crt0.o ${OBJS} ${DPADD} - ${CC} ${CFLAGS} ${LDFLAGS} -static -nostdlib -Wl,-N,-T,110000 \ - -o doscmd.kernel crt0.o ${OBJS} ${LDADD} -.endif diff --git a/usr.bin/ldd/sods.c b/usr.bin/ldd/sods.c index 37678f1b06..48839ed960 100644 --- a/usr.bin/ldd/sods.c +++ b/usr.bin/ldd/sods.c @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/ldd/sods.c,v 1.9.2.2 2001/07/11 23:59:11 obrien Exp $ - * $DragonFly: src/usr.bin/ldd/sods.c,v 1.3 2003/10/04 20:36:47 hmp Exp $ + * $DragonFly: src/usr.bin/ldd/sods.c,v 1.4 2004/03/20 16:27:42 drhodus Exp $ */ #include @@ -41,7 +41,7 @@ #define FREEBSD_AOUT #include -#include +#include #include #define PAGE_SIZE 4096 /* i386 specific */ diff --git a/usr.sbin/keyserv/Makefile b/usr.sbin/keyserv/Makefile index 68d784b3d9..956f04d302 100644 --- a/usr.sbin/keyserv/Makefile +++ b/usr.sbin/keyserv/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/usr.sbin/keyserv/Makefile,v 1.5.2.1 2001/04/25 12:09:50 ru Exp $ -# $DragonFly: src/usr.sbin/keyserv/Makefile,v 1.2 2003/06/17 04:29:55 dillon Exp $ +# $DragonFly: src/usr.sbin/keyserv/Makefile,v 1.3 2004/03/20 16:27:42 drhodus Exp $ PROG= keyserv SRCS= keyserv.c setkey.c keyserv_uid.c crypt_svc.c crypt_server.c crypt.h @@ -7,9 +7,6 @@ SRCS= keyserv.c setkey.c keyserv_uid.c crypt_svc.c crypt_server.c crypt.h MAN= keyserv.8 CFLAGS+= -DKEYSERV_RANDOM -DBROKEN_DES -I. -.if $(OBJFORMAT) == elf -CFLAGS+= -DOBJFORMAT_ELF -.endif DPADD= ${LIBMP} ${LIBRPCSVC} LDADD= -lmp -lrpcsvc diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c index 24fd3a0f68..93ba65f182 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/keyserv/crypt_server.c,v 1.6.2.1 2001/07/19 04:21:20 kris Exp $ - * $DragonFly: src/usr.sbin/keyserv/crypt_server.c,v 1.4 2003/11/16 15:17:36 eirikn Exp $ + * $DragonFly: src/usr.sbin/keyserv/crypt_server.c,v 1.5 2004/03/20 16:27:42 drhodus Exp $ */ #include @@ -166,11 +166,7 @@ static void *dlhandle; #endif #ifndef LIBCRYPTO -#ifdef OBJFORMAT_ELF #define LIBCRYPTO "libcrypto.so.1" -#else -#define LIBCRYPTO "libcrypto.so.1." -#endif /* OBJFORMAT_ELF */ #endif void load_des(int warn, char *libpath) @@ -178,37 +174,12 @@ void load_des(int warn, char *libpath) char dlpath[MAXPATHLEN]; if (libpath == NULL) { -#ifdef OBJFORMAT_ELF snprintf(dlpath, sizeof(dlpath), "%s/%s", _PATH_USRLIB, LIBCRYPTO); -#else - len = strlen(LIBCRYPTO); - if ((dird = opendir(_PATH_USRLIB)) == NULL) - err(1, "opendir(/usr/lib) failed"); - - while ((dirp = readdir(dird)) != NULL) { - /* must have a minor number */ - if (strlen(dirp->d_name) <= len) - continue; - if (!strncmp(dirp->d_name, LIBCRYPTO, len)) { - if (atoi((dirp->d_name + len + 1)) > minor) { - minor = atoi((dirp->d_name + len + 1)); - snprintf(dlpath,sizeof(dlpath),"%s/%s", - _PATH_USRLIB, dirp->d_name); - } - } - } - - closedir(dird); -#endif /* OBJFORMAT_ELF */ } else snprintf(dlpath, sizeof(dlpath), "%s", libpath); if (dlpath != NULL && (dlhandle = dlopen(dlpath, 0444)) != NULL) -#ifdef OBJFORMAT_ELF _my_crypt = (int (*)())dlsym(dlhandle, "_des_crypt"); -#else - _my_crypt = (int (*)())dlsym(dlhandle, "__des_crypt"); -#endif /* OBJFORMAT_ELF */ if (_my_crypt == NULL) { if (dlhandle != NULL) -- 2.41.0