diff options
author | peter <peter@FreeBSD.org> | 2002-09-17 01:49:00 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-09-17 01:49:00 +0000 |
commit | a51c9b66271f0551fb83b90a7db6c464eac2318b (patch) | |
tree | 7d8147c99f6bfb34b7cb47ad46e24a4f7dc93102 /usr.bin | |
parent | 2a4cb24fb4a35753b66a2503614b874481e35535 (diff) | |
download | FreeBSD-src-a51c9b66271f0551fb83b90a7db6c464eac2318b.zip FreeBSD-src-a51c9b66271f0551fb83b90a7db6c464eac2318b.tar.gz |
Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.
Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/Makefile | 10 | ||||
-rw-r--r-- | usr.bin/doscmd/Makefile | 31 | ||||
-rw-r--r-- | usr.bin/ldd/sods.c | 4 | ||||
-rw-r--r-- | usr.bin/objformat/Makefile | 16 | ||||
-rw-r--r-- | usr.bin/objformat/objformat.1 | 59 | ||||
-rw-r--r-- | usr.bin/objformat/objformat.c | 51 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/Makefile | 3 |
7 files changed, 18 insertions, 156 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 644d0b0..3947fb7 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -227,17 +227,11 @@ SUBDIR+=vacation .if ${MACHINE_ARCH} == "i386" # Things that don't compile on alpha or are aout specific: -SUBDIR+=ar \ - doscmd \ +SUBDIR+=doscmd \ 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 5a46a83..4f5591d 100644 --- a/usr.bin/doscmd/Makefile +++ b/usr.bin/doscmd/Makefile @@ -14,14 +14,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} @@ -37,10 +30,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} \ @@ -49,19 +38,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 @@ -96,11 +73,3 @@ redir.com: redir.com.uu NEED_LIBNAMES= yes .include <bsd.prog.mk> - -.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 ab8affa..195651e 100644 --- a/usr.bin/ldd/sods.c +++ b/usr.bin/ldd/sods.c @@ -34,14 +34,12 @@ __FBSDID("$FreeBSD$"); #include <arpa/inet.h> -#define FREEBSD_AOUT - #include <a.out.h> #include <assert.h> #include <ctype.h> #include <err.h> #include <fcntl.h> -#include <link.h> +#include <sys/link_aout.h> #include <stab.h> #include <stdio.h> #include <stdlib.h> diff --git a/usr.bin/objformat/Makefile b/usr.bin/objformat/Makefile index 9c47abe..714cb48 100644 --- a/usr.bin/objformat/Makefile +++ b/usr.bin/objformat/Makefile @@ -1,21 +1,5 @@ # $FreeBSD$ PROG= objformat -NOSHARED?= YES - -LINKS+= ${BINDIR}/objformat ${BINDIR}/addr2line -LINKS+= ${BINDIR}/objformat ${BINDIR}/ar -LINKS+= ${BINDIR}/objformat ${BINDIR}/as -LINKS+= ${BINDIR}/objformat ${BINDIR}/c++filt -LINKS+= ${BINDIR}/objformat ${BINDIR}/gasp -LINKS+= ${BINDIR}/objformat ${BINDIR}/gdb -LINKS+= ${BINDIR}/objformat ${BINDIR}/ld -LINKS+= ${BINDIR}/objformat ${BINDIR}/nm -LINKS+= ${BINDIR}/objformat ${BINDIR}/objcopy -LINKS+= ${BINDIR}/objformat ${BINDIR}/objdump -LINKS+= ${BINDIR}/objformat ${BINDIR}/ranlib -LINKS+= ${BINDIR}/objformat ${BINDIR}/size -LINKS+= ${BINDIR}/objformat ${BINDIR}/strings -LINKS+= ${BINDIR}/objformat ${BINDIR}/strip .include <bsd.prog.mk> diff --git a/usr.bin/objformat/objformat.1 b/usr.bin/objformat/objformat.1 index c5575b4..84ac346 100644 --- a/usr.bin/objformat/objformat.1 +++ b/usr.bin/objformat/objformat.1 @@ -30,62 +30,26 @@ .Dt OBJFORMAT 1 .Sh NAME .Nm objformat -.Nd reports default binary format and program deflector +.Nd reports default binary format .Sh SYNOPSIS .Nm -.Nm prog .Sh DESCRIPTION -If run as -.Nm -the default object file format is reported. The two different object file -formats are -.Ar aout -and +This program os obsolete and is now just a compatability stub. +It reports the object file format as .Ar elf . -.Pp -If invoked by any other name, -.Nm prog -is expanded to -.Pa /usr/libexec/<objformat>/prog -and executed. -.Sh DIAGNOSTICS -The -.Nm -utility returns with exit code 1 -if called with an improper number of arguments, or if -.Nm prog -could not be executed. -.Sh ENVIRONMENT -.Bl -tag -width OBJFORMAT_PATH -.It Ev OBJFORMAT -If the environment variable -.Ev OBJFORMAT -is set, it overrides the default object file format. -.Ev OBJFORMAT takes precedence over -.Pa /etc/objformat . -.It Ev OBJFORMAT_PATH -If the environment variable -.Ev OBJFORMAT_PATH -is set, its value is used as the base path to -.Nm prog . -The default is -.Pa /usr/libexec . -.El -.Sh FILES -.Bl -tag -width /etc/objformat -compact -.It Pa /etc/objformat -If present, specifies the object file format to use. Syntax is -.Ql OBJFORMAT=xxx . -.El -.Sh SEE ALSO -.Xr file 1 , -.Xr getobjformat 3 -.\" .Sh STANDARDS .Sh HISTORY The .Nm command appeared in .Fx 3.0 . +.Pp +The +.Nm +program was deprecated in +.Fx 4.0 +and reduced to a compatability stub in +.Fx 5.0 . +It will be completely removed before the next release. .Sh AUTHORS .An -nosplit The @@ -94,4 +58,3 @@ utility was written by .An Peter Wemm Aq peter@netplex.com.au . This manual page was written by .An David O'Brien Aq obrien@NUXI.com . -.\" .Sh BUGS diff --git a/usr.bin/objformat/objformat.c b/usr.bin/objformat/objformat.c index 1b3e35d..f2e9595 100644 --- a/usr.bin/objformat/objformat.c +++ b/usr.bin/objformat/objformat.c @@ -26,58 +26,13 @@ * $FreeBSD$ */ -#include <err.h> -#include <objformat.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <unistd.h> +#include <stdlib.h> int main(int argc, char **argv) { - char objformat[32]; - char *path, *chunk; - char *cmd, *newcmd = NULL; - const char *objformat_path; - - if (getobjformat(objformat, sizeof objformat, &argc, argv) == -1) - errx(1, "Invalid object format"); - - cmd = strrchr(argv[0], '/'); - if (cmd != NULL) - cmd++; - else - cmd = argv[0]; - - if (strcmp(cmd, "objformat") == 0) { - if (argc != 1) { - fprintf(stderr, "usage: objformat\n"); - exit(1); - } - printf("%s\n", objformat); - exit(0); - } - - /* 'make world' glue */ - objformat_path = getenv("OBJFORMAT_PATH"); - if (objformat_path == NULL) - objformat_path = "/usr/libexec"; - path = strdup(objformat_path); - - setenv("OBJFORMAT", objformat, 1); - - while ((chunk = strsep(&path, ":")) != NULL) { - if (newcmd != NULL) { - free(newcmd); - newcmd = NULL; - } - asprintf(&newcmd, "%s/%s/%s", chunk, objformat, cmd); - if (newcmd == NULL) - err(1, "cannot allocate memory for new command"); - argv[0] = newcmd; - execv(newcmd, argv); - } - err(1, "could not exec %s/%s in %s", objformat, cmd, objformat_path); + write(1, "elf\n", 4); + return (0); } diff --git a/usr.bin/xlint/lint1/Makefile b/usr.bin/xlint/lint1/Makefile index 6371c94..709c045 100644 --- a/usr.bin/xlint/lint1/Makefile +++ b/usr.bin/xlint/lint1/Makefile @@ -13,11 +13,10 @@ CFLAGS+= -I. -I${.CURDIR} LINTFLAGS=-aehpz BINDIR= /usr/libexec -OBJFORMAT_PATH?= ${BINDIR} # src/Makefile.inc1 sets this .PATH: ${.CURDIR}/../common lint.7: makeman - sh ${.CURDIR}/makeman ${OBJFORMAT_PATH}/${PROG} -m >${.TARGET} + sh ${.CURDIR}/makeman ${BINDIR}/${PROG} -m >${.TARGET} .include <bsd.prog.mk> |