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:
parent
f5e4cc118e
commit
20d6ace077
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user