mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 23:05:49 +01:00
Make ldd work on alpha.
This commit is contained in:
parent
4fab6203a9
commit
97db68b61b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39354
@ -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>
|
||||
|
@ -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);
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user