Mipsel changes to ELF ldd/ld.so:

* don't abort() on NetBSD/pmax 1.1 elf binaries;
  * Assume 32-bit elf unless compiling for Alpha;
  * note bugs in ldd's README.
This commit is contained in:
jonathan 1996-12-17 03:42:44 +00:00
parent f5e4cc118e
commit 20d6ace077
5 changed files with 46 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: map_object.c,v 1.1 1996/12/16 20:38:01 cgd Exp $ */
/* $NetBSD: map_object.c,v 1.2 1996/12/17 03:42:44 jonathan Exp $ */
/*
* Copyright 1996 John D. Polstra.
@ -145,6 +145,13 @@ _rtld_map_object(
switch(phdr->p_type) {
case Elf_pt_load:
#ifdef __mips__
/* NetBSD/pmax 1.1 elf toolchain peculiarity */
if (nsegs >= 2) {
_rtld_error("%s: too many sections\n", path);
return NULL;
}
#endif
assert(nsegs < 2);
segs[nsegs] = phdr;
++nsegs;

View File

@ -1,14 +1,22 @@
# $NetBSD: Makefile,v 1.1 1996/12/16 19:59:55 cgd Exp $
# $NetBSD: Makefile,v 1.2 1996/12/17 03:42:52 jonathan Exp $
PROG= ldd
SRCS= ldd.c \
xmalloc.c debug.c map_object.c load.c search.c headers.c paths.c
NOMAN=
CFLAGS+= -Wall -DELFSIZE=64 -I${.CURDIR}/../../libexec/ld.elf_so
.if (${MACHINE_ARCH} == "alpha")
CFLAGS+= -DELFSIZE=64
.else
CFLAGS+= -DELFSIZE=32
.endif
CFLAGS+= -Wall -I${.CURDIR}/../../libexec/ld.elf_so
CFLAGS+= -DLIBDIR=\"${LIBDIR}\"
#CFLAGS+= -DDEBUG
LDFLAGS+= -static
.PATH: ${.CURDIR}/../../libexec/ld.elf_so

View File

@ -1,4 +1,12 @@
$NetBSD: README,v 1.1 1996/12/16 19:59:56 cgd Exp $
$NetBSD: README,v 1.2 1996/12/17 03:42:57 jonathan Exp $
BUGS/PROBLEMS:
* Reports "ldd: mmap of entire address space failed: Cannot allocate memory",
or erroneously reports that libraries cannot be found,
when run on many files (`ldd /usr/bin/*').
TO DO:

View File

@ -1,14 +1,22 @@
# $NetBSD: Makefile,v 1.1 1996/12/16 19:59:55 cgd Exp $
# $NetBSD: Makefile,v 1.2 1996/12/17 03:42:52 jonathan Exp $
PROG= ldd
SRCS= ldd.c \
xmalloc.c debug.c map_object.c load.c search.c headers.c paths.c
NOMAN=
CFLAGS+= -Wall -DELFSIZE=64 -I${.CURDIR}/../../libexec/ld.elf_so
.if (${MACHINE_ARCH} == "alpha")
CFLAGS+= -DELFSIZE=64
.else
CFLAGS+= -DELFSIZE=32
.endif
CFLAGS+= -Wall -I${.CURDIR}/../../libexec/ld.elf_so
CFLAGS+= -DLIBDIR=\"${LIBDIR}\"
#CFLAGS+= -DDEBUG
LDFLAGS+= -static
.PATH: ${.CURDIR}/../../libexec/ld.elf_so

View File

@ -1,4 +1,12 @@
$NetBSD: README,v 1.1 1996/12/16 19:59:56 cgd Exp $
$NetBSD: README,v 1.2 1996/12/17 03:42:57 jonathan Exp $
BUGS/PROBLEMS:
* Reports "ldd: mmap of entire address space failed: Cannot allocate memory",
or erroneously reports that libraries cannot be found,
when run on many files (`ldd /usr/bin/*').
TO DO: