Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src kill ldd_aout. it didn't work anyway...not since i don't kn...
details: https://anonhg.NetBSD.org/src/rev/6edef6af7134
branches: trunk
changeset: 746883:6edef6af7134
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Aug 22 06:52:15 2009 +0000
description:
kill ldd_aout. it didn't work anyway...not since i don't know when.
diffstat:
rescue/Makefile | 8 +--
rescue/list.ldd | 3 +-
rescue/list.ldd.noaout | 12 ----
usr.bin/ldd/Makefile | 8 +--
usr.bin/ldd/aout/Makefile | 10 ---
usr.bin/ldd/ldd.1 | 27 +--------
usr.bin/ldd/ldd.c | 7 +-
usr.bin/ldd/ldd.h | 3 +-
usr.bin/ldd/ldd_aout.c | 126 ----------------------------------------------
9 files changed, 11 insertions(+), 193 deletions(-)
diffs (truncated from 311 to 300 lines):
diff -r 825b6837714d -r 6edef6af7134 rescue/Makefile
--- a/rescue/Makefile Sat Aug 22 02:40:26 2009 +0000
+++ b/rescue/Makefile Sat Aug 22 06:52:15 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2009/08/21 15:16:45 he Exp $
+# $NetBSD: Makefile,v 1.24 2009/08/22 06:52:15 mrg Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -35,13 +35,7 @@
CRUNCHENV+= MKKERBEROS=no # for ssh
.endif
-.if ${MACHINE_CPU} != "mips"
LISTS+= ${.CURDIR}/list.ldd
-LDD_AOUTDIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/aout && ${PRINTOBJDIR}
-PARSELISTENV+= LDD_AOUTDIR=${LDD_AOUTDIR}
-.else
-LISTS+= ${.CURDIR}/list.ldd.noaout
-.endif
LDD_ELF32DIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/elf32 && ${PRINTOBJDIR}
LDD_ELF64DIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/elf64 && ${PRINTOBJDIR}
PARSELISTENV+= LDD_ELF32DIR=${LDD_ELF32DIR} LDD_ELF64DIR=${LDD_ELF64DIR}
diff -r 825b6837714d -r 6edef6af7134 rescue/list.ldd
--- a/rescue/list.ldd Sat Aug 22 02:40:26 2009 +0000
+++ b/rescue/list.ldd Sat Aug 22 06:52:15 2009 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: list.ldd,v 1.1 2009/01/07 00:39:24 mrg Exp $
+# $NetBSD: list.ldd,v 1.2 2009/08/22 06:52:15 mrg Exp $
PROG ldd
-LIBS ${LDD_AOUTDIR}/libldd_aout.a
LIBS ${LDD_ELF32DIR}/libldd_elf32.a
LIBS ${LDD_ELF64DIR}/libldd_elf64.a
diff -r 825b6837714d -r 6edef6af7134 rescue/list.ldd.noaout
--- a/rescue/list.ldd.noaout Sat Aug 22 02:40:26 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-# $NetBSD: list.ldd.noaout,v 1.1 2009/08/21 15:16:46 he Exp $
-
-PROG ldd
-
-LIBS ${LDD_ELF32DIR}/libldd_elf32.a
-LIBS ${LDD_ELF64DIR}/libldd_elf64.a
-
-SPECIAL ldd keepsymbols _rtld_pagesz _rtld_error _rtld_trust
-SPECIAL ldd keepsymbols _rtld_default_paths _rtld_paths
-SPECIAL ldd keepsymbols _rtld_xforms _rtld_objmain
-SPECIAL ldd keepsymbols _rtld_objtail _rtld_objlist
-SPECIAL ldd keepsymbols print_needed main_local main_progname
diff -r 825b6837714d -r 6edef6af7134 usr.bin/ldd/Makefile
--- a/usr.bin/ldd/Makefile Sat Aug 22 02:40:26 2009 +0000
+++ b/usr.bin/ldd/Makefile Sat Aug 22 06:52:15 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2009/08/20 21:07:47 he Exp $
+# $NetBSD: Makefile,v 1.13 2009/08/22 06:52:16 mrg Exp $
WARNS?= 3 # XXX: -Wsign-compare issues ld.elf_so source
@@ -9,12 +9,6 @@
MAN= ldd.1
-.if (${MACHINE_CPU} != "mips")
-SUBDIR= aout
-LIB_AOUTDIR!= cd ${.CURDIR}/aout && ${PRINTOBJDIR}
-EXTRA_LIBS+= ${LIB_AOUTDIR}/libldd_aout.a
-.endif
-
SUBDIR+= elf32 elf64
.if (${MACHINE_ARCH} != "alpha")
diff -r 825b6837714d -r 6edef6af7134 usr.bin/ldd/aout/Makefile
--- a/usr.bin/ldd/aout/Makefile Sat Aug 22 02:40:26 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# $NetBSD: Makefile,v 1.1 2009/01/06 03:59:56 mrg Exp $
-
-LIBISPRIVATE= yes
-
-LIB= ldd_aout
-SRCS= ${LIB}.c
-
-.PATH: ${.CURDIR}/..
-
-.include <bsd.lib.mk>
diff -r 825b6837714d -r 6edef6af7134 usr.bin/ldd/ldd.1
--- a/usr.bin/ldd/ldd.1 Sat Aug 22 02:40:26 2009 +0000
+++ b/usr.bin/ldd/ldd.1 Sat Aug 22 06:52:15 2009 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ldd.1,v 1.14 2008/04/30 13:11:01 martin Exp $
+.\" $NetBSD: ldd.1,v 1.15 2009/08/22 06:52:16 mrg Exp $
.\"
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -53,26 +53,10 @@
and allows customization of
.Nm ldd Ns 's
output.
-The first format argument is used for library objects and is equivalent
-to the
-.Xr ld.aout_so 1
-environment variable
-.Ev LD_TRACE_LOADED_OBJECTS_FMT1 .
-It defaults to
-.Qq "\et-l%o.%m =\*[Gt] %p\en"
-for elf and
-.Qq "\et-l%o.%m =\*[Gt] %p (%x)\en"
-for a.out.
-The second format argument is used for non-library objects and it is equivalent
-to the
-.Xr ld.aout_so 1
-environment variable
-.Ev LD_TRACE_LOADED_OBJECTS_FMT2 .
-It defaults to
-.Qq "\et%o =\*[Gt] %p\en"
-for elf and
-.Qq "\et%o (%x)\en"
-for a.out.
+The first format argument is used for library objects and defaults to
+.Qq "\et-l%o.%m =\*[Gt] %p\en" .
+The second format argument is used for non-library objects defaults to
+.Qq "\et%o =\*[Gt] %p\en" .
.Pp
These arguments are interpreted as format strings a la
.Xr printf 3
@@ -111,7 +95,6 @@
are recognized and have their usual meaning.
.Sh SEE ALSO
.Xr ld 1 ,
-.Xr ld.aout_so 1 ,
.Xr ld.elf_so 1 ,
.Xr nm 1 ,
.Xr rtld 1
diff -r 825b6837714d -r 6edef6af7134 usr.bin/ldd/ldd.c
--- a/usr.bin/ldd/ldd.c Sat Aug 22 02:40:26 2009 +0000
+++ b/usr.bin/ldd/ldd.c Sat Aug 22 06:52:15 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ldd.c,v 1.8 2009/08/20 21:06:17 he Exp $ */
+/* $NetBSD: ldd.c,v 1.9 2009/08/22 06:52:16 mrg Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ldd.c,v 1.8 2009/08/20 21:06:17 he Exp $");
+__RCSID("$NetBSD: ldd.c,v 1.9 2009/08/22 06:52:16 mrg Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -156,9 +156,6 @@
#if defined(_LP64) && !defined(__alpha__)
&& elf32_ldd(fd, *argv, fmt1, fmt2) == -1
#endif
-#if !defined(__mips__)
- && aout_ldd(fd, *argv, fmt1, fmt2) == -1
-#endif
)
warnx("%s", error_message);
close(fd);
diff -r 825b6837714d -r 6edef6af7134 usr.bin/ldd/ldd.h
--- a/usr.bin/ldd/ldd.h Sat Aug 22 02:40:26 2009 +0000
+++ b/usr.bin/ldd/ldd.h Sat Aug 22 06:52:15 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ldd.h,v 1.2 2009/02/03 03:01:02 mrg Exp $ */
+/* $NetBSD: ldd.h,v 1.3 2009/08/22 06:52:16 mrg Exp $ */
/*
* Copyright (c) 2008 Matthew R. Green
@@ -28,7 +28,6 @@
* SUCH DAMAGE.
*/
-int aout_ldd(int, char *, char *, char *);
int elf32_ldd(int, char *, char *, char *);
#ifdef _LP64
diff -r 825b6837714d -r 6edef6af7134 usr.bin/ldd/ldd_aout.c
--- a/usr.bin/ldd/ldd_aout.c Sat Aug 22 02:40:26 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/* $NetBSD: ldd_aout.c,v 1.4 2009/08/16 18:43:08 martin Exp $ */
-
-/*-
- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Paul Kranenburg.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: ldd_aout.c,v 1.4 2009/08/16 18:43:08 martin Exp $");
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/exec_aout.h>
-
-#include <a.out.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/* from <compat/netbsd32/netbsd32_exec.h> */
-/*
- * Header prepended to each a.out file.
- * only manipulate the a_midmag field via the
- * N_SETMAGIC/N_GET{MAGIC,MID,FLAG} macros below.
- */
-typedef unsigned int netbsd32_u_long;
-struct netbsd32_exec {
- netbsd32_u_long a_midmag; /* htonl(flags<<26 | mid<<16 | magic) */
- netbsd32_u_long a_text; /* text segment size */
- netbsd32_u_long a_data; /* initialized data size */
- netbsd32_u_long a_bss; /* uninitialized data size */
- netbsd32_u_long a_syms; /* symbol table size */
- netbsd32_u_long a_entry; /* entry point */
- netbsd32_u_long a_trsize; /* text relocation size */
- netbsd32_u_long a_drsize; /* data relocation size */
-};
-
-
-/*
- * XXX put this here, rather than a separate ldd_aout.h
-#include "ldd.h"
- */
-int aout_ldd(int, char *, char *, char *);
-
-int
-aout_ldd(int fd, char *file, char *fmt1, char *fmt2)
-{
- struct netbsd32_exec hdr;
- int status, rval;
-
- if (lseek(fd, 0, SEEK_SET) < 0 ||
- read(fd, &hdr, sizeof hdr) != sizeof hdr
-#if 1 /* Compatibility */
- || hdr.a_entry < N_PAGSIZ(hdr)
-#endif
- || (N_GETFLAG(hdr) & EX_DPMASK) != EX_DYNAMIC)
- /* calling function prints warning */
- return -1;
-
- setenv("LD_TRACE_LOADED_OBJECTS", "", 1);
- if (fmt1)
- setenv("LD_TRACE_LOADED_OBJECTS_FMT1", fmt1, 1);
- if (fmt2)
- setenv("LD_TRACE_LOADED_OBJECTS_FMT2", fmt2, 1);
-
- setenv("LD_TRACE_LOADED_OBJECTS_PROGNAME", file, 1);
- if (fmt1 == NULL && fmt2 == NULL)
- printf("%s:\n", file);
- fflush(stdout);
-
- rval = 0;
- switch (fork()) {
- case -1:
- err(1, "fork");
- break;
- default:
- if (wait(&status) <= 0) {
- warn("wait");
- rval |= 1;
- } else if (WIFSIGNALED(status)) {
- fprintf(stderr, "%s: signal %d\n",
- file, WTERMSIG(status));
- rval |= 1;
- } else if (WIFEXITED(status) && WEXITSTATUS(status)) {
- fprintf(stderr, "%s: exit status %d\n",
Home |
Main Index |
Thread Index |
Old Index