diff options
author | dfr <dfr@FreeBSD.org> | 1998-09-16 09:31:48 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-09-16 09:31:48 +0000 |
commit | 2c574d9124f4f331878360e8bcc09ad7fb39441b (patch) | |
tree | 72814e8d763cc32761c88c81689445c857f624a6 /usr.bin/ldd | |
parent | 7a96388db15e18cf622a09252ee2584d302e99ee (diff) | |
download | FreeBSD-src-2c574d9124f4f331878360e8bcc09ad7fb39441b.zip FreeBSD-src-2c574d9124f4f331878360e8bcc09ad7fb39441b.tar.gz |
Make ldd work on alpha.
Diffstat (limited to 'usr.bin/ldd')
-rw-r--r-- | usr.bin/ldd/Makefile | 9 | ||||
-rw-r--r-- | usr.bin/ldd/ldd.c | 10 | ||||
-rw-r--r-- | usr.bin/ldd/sods.c | 4 |
3 files changed, 15 insertions, 8 deletions
diff --git a/usr.bin/ldd/Makefile b/usr.bin/ldd/Makefile index 04cc7a7..a3a7269 100644 --- a/usr.bin/ldd/Makefile +++ b/usr.bin/ldd/Makefile @@ -1,7 +1,10 @@ -# $Id: Makefile,v 1.8 1998/06/01 13:55:12 peter Exp $ +# $Id: Makefile,v 1.9 1998/06/12 14:11:15 peter Exp $ PROG= ldd -SRCS= ldd.c sods.c -CFLAGS+= -Wall -DFREEBSD_AOUT +SRCS= ldd.c +.if ${MACHINE_ARCH} == "i386" +SRCS+= sods.c +.endif +CFLAGS+= -Wall .include <bsd.prog.mk> diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index 3a4f3f6..860b053 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -27,7 +27,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: ldd.c,v 1.15 1998/05/01 08:40:11 dfr Exp $ + * $Id: ldd.c,v 1.16 1998/08/30 18:30:59 jdp Exp $ */ #include <sys/types.h> @@ -94,11 +94,13 @@ char *argv[]; /*NOTREACHED*/ } +#ifdef __i386__ if (vflag) { for (c = 0; c < argc; c++) dump_file(argv[c]); exit(error_count == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } +#endif /* ld.so magic */ setenv("LD_TRACE_LOADED_OBJECTS", "1", 1); @@ -112,7 +114,7 @@ char *argv[]; int fd; union { struct exec aout; - Elf32_Ehdr elf; + Elf_Ehdr elf; } hdr; int n; int status; @@ -142,8 +144,8 @@ char *argv[]; file_ok = 0; } } else if (n >= sizeof hdr.elf && IS_ELF(hdr.elf)) { - Elf32_Ehdr ehdr; - Elf32_Phdr phdr; + Elf_Ehdr ehdr; + Elf_Phdr phdr; int dynamic = 0, i; lseek(fd, 0, SEEK_SET); diff --git a/usr.bin/ldd/sods.c b/usr.bin/ldd/sods.c index 801cca0..70784e6 100644 --- a/usr.bin/ldd/sods.c +++ b/usr.bin/ldd/sods.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sods.c,v 1.6 1997/11/28 19:34:27 jdp Exp $ + * $Id: sods.c,v 1.7 1998/05/01 08:40:11 dfr Exp $ */ #include <assert.h> @@ -38,6 +38,8 @@ #include <sys/mman.h> #include <sys/stat.h> +#define FREEBSD_AOUT + #include <a.out.h> #include <elf.h> #include <link.h> |