summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-09-17 01:49:00 +0000
committerpeter <peter@FreeBSD.org>2002-09-17 01:49:00 +0000
commita51c9b66271f0551fb83b90a7db6c464eac2318b (patch)
tree7d8147c99f6bfb34b7cb47ad46e24a4f7dc93102 /sbin
parent2a4cb24fb4a35753b66a2503614b874481e35535 (diff)
downloadFreeBSD-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 'sbin')
-rw-r--r--sbin/ldconfig/ldconfig.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c
index eab4797..284ec0b 100644
--- a/sbin/ldconfig/ldconfig.c
+++ b/sbin/ldconfig/ldconfig.c
@@ -44,7 +44,7 @@ static const char rcsid[] =
#include <err.h>
#include <errno.h>
#include <fcntl.h>
-#include <link.h>
+#include <sys/link_aout.h>
#include <objformat.h>
#include <stdio.h>
#include <stdlib.h>
@@ -102,17 +102,18 @@ 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)
OpenPOWER on IntegriCloud