head	1.33;
access;
symbols
	RELENG_5_5_0_RELEASE:1.31.8.1
	RELENG_5_5:1.31.8.1.0.4
	RELENG_5_5_BP:1.31.8.1
	RELENG_5_4_0_RELEASE:1.31.8.1
	RELENG_5_4:1.31.8.1.0.2
	RELENG_5_4_BP:1.31.8.1
	RELENG_4_11_0_RELEASE:1.29.2.2
	RELENG_4_11:1.29.2.2.0.10
	RELENG_4_11_BP:1.29.2.2
	RELENG_5_3_0_RELEASE:1.31
	RELENG_5_3:1.31.0.10
	RELENG_5_3_BP:1.31
	RELENG_5:1.31.0.8
	RELENG_5_BP:1.31
	RELENG_4_10_0_RELEASE:1.29.2.2
	RELENG_4_10:1.29.2.2.0.8
	RELENG_4_10_BP:1.29.2.2
	RELENG_5_2_1_RELEASE:1.31
	RELENG_5_2_0_RELEASE:1.31
	RELENG_5_2:1.31.0.6
	RELENG_5_2_BP:1.31
	RELENG_4_9_0_RELEASE:1.29.2.2
	RELENG_4_9:1.29.2.2.0.6
	RELENG_4_9_BP:1.29.2.2
	RELENG_5_1_0_RELEASE:1.31
	RELENG_5_1:1.31.0.4
	RELENG_5_1_BP:1.31
	RELENG_4_8_0_RELEASE:1.29.2.2
	RELENG_4_8:1.29.2.2.0.4
	RELENG_4_8_BP:1.29.2.2
	RELENG_5_0_0_RELEASE:1.31
	RELENG_5_0:1.31.0.2
	RELENG_5_0_BP:1.31
	RELENG_4_7_0_RELEASE:1.29.2.2
	RELENG_4_7:1.29.2.2.0.2
	RELENG_4_7_BP:1.29.2.2
	RELENG_4_6_2_RELEASE:1.29.2.1
	RELENG_4_6_1_RELEASE:1.29.2.1
	RELENG_4_6_0_RELEASE:1.29.2.1
	RELENG_4_6:1.29.2.1.0.6
	RELENG_4_6_BP:1.29.2.1
	RELENG_4_5_0_RELEASE:1.29.2.1
	RELENG_4_5:1.29.2.1.0.4
	RELENG_4_5_BP:1.29.2.1
	RELENG_4_4_0_RELEASE:1.29.2.1
	RELENG_4_4:1.29.2.1.0.2
	RELENG_4_4_BP:1.29.2.1
	RELENG_4_3_0_RELEASE:1.29
	RELENG_4_3:1.29.0.4
	RELENG_4_3_BP:1.29
	RELENG_4_2_0_RELEASE:1.29
	RELENG_4_1_1_RELEASE:1.29
	PRE_SMPNG:1.29
	RELENG_4_1_0_RELEASE:1.29
	RELENG_3_5_0_RELEASE:1.27.2.1
	RELENG_4_0_0_RELEASE:1.29
	RELENG_4:1.29.0.2
	RELENG_4_BP:1.29
	RELENG_3_4_0_RELEASE:1.27.2.1
	RELENG_3_3_0_RELEASE:1.27.2.1
	RELENG_3_2_PAO:1.27.0.4
	RELENG_3_2_PAO_BP:1.27
	RELENG_3_2_0_RELEASE:1.27
	RELENG_3_1_0_RELEASE:1.27
	RELENG_3:1.27.0.2
	RELENG_3_BP:1.27
	RELENG_3_0_0_RELEASE:1.27
	old_RELENG_2_2_8_RELEASE:1.21.2.1
	old_RELENG_2_2_7_RELEASE:1.21.2.1
	old_RELENG_2_2_6_RELEASE:1.21.2.1
	old_RELENG_2_2_5_RELEASE:1.21.2.1
	old_RELENG_2_2_2_RELEASE:1.21.2.1
	old_RELENG_2_2_1_RELEASE:1.21
	old_RELENG_2_2_0_RELEASE:1.21
	old_RELENG_2_1_7_RELEASE:1.14.4.4
	old_RELENG_2_1_6_1_RELEASE:1.14.4.4
	old_RELENG_2_1_6_RELEASE:1.14.4.4
	old_RELENG_2_2:1.21.0.2
	old_RELENG_2_2_BP:1.21
	old_RELENG_2_1_5_RELEASE:1.14.4.4
	old_RELENG_2_1_0_RELEASE:1.14.4.1
	old_RELENG_2_1_0:1.14.0.4
	old_RELENG_2_1_0_BP:1.14
	old_RELENG_2_0_5_RELEASE:1.14
	old_RELENG_2_0_5:1.14.0.2
	old_RELENG_2_0_5_BP:1.14
	old_RELENG_2_0_5_ALPHA:1.14
	old_RELEASE_2_0:1.13
	old_BETA_2_0:1.13
	old_ALPHA_2_0:1.13.0.2
	old_MOVED_NEWCVS:1.10
	old_FINAL_1_1_5:1.10
	old_ALPHA_1_1_5:1.10
	old_FINAL_1_1:1.9
	old_GAMMA_1_1:1.9
	old_BETA_1_1:1.9.0.2
	old_BP_BETA_1_1:1.9;
locks; strict;
comment	@# @;


1.33
date	2005.01.11.06.15.19;	author trhodes;	state dead;
branches;
next	1.32;

1.32
date	2004.11.03.18.01.19;	author ru;	state Exp;
branches;
next	1.31;

1.31
date	2001.09.12.10.04.41;	author ru;	state Exp;
branches
	1.31.8.1;
next	1.30;

1.30
date	2001.03.26.14.22.08;	author ru;	state Exp;
branches;
next	1.29;

1.29
date	2000.01.29.03.13.49;	author jdp;	state Exp;
branches
	1.29.2.1;
next	1.28;

1.28
date	99.08.28.00.10.04;	author peter;	state Exp;
branches;
next	1.27;

1.27
date	98.09.05.08.31.10;	author jb;	state Exp;
branches
	1.27.2.1;
next	1.26;

1.26
date	98.06.01.13.00.32;	author peter;	state Exp;
branches;
next	1.25;

1.25
date	97.11.29.03.32.46;	author jdp;	state Exp;
branches;
next	1.24;

1.24
date	97.04.16.11.31.32;	author bde;	state Exp;
branches;
next	1.23;

1.23
date	97.02.22.15.46.46;	author peter;	state Exp;
branches;
next	1.22;

1.22
date	97.01.14.05.58.09;	author jkh;	state Exp;
branches;
next	1.21;

1.21
date	96.10.01.01.51.40;	author peter;	state Exp;
branches
	1.21.2.1;
next	1.20;

1.20
date	96.09.12.03.42.54;	author bde;	state Exp;
branches;
next	1.19;

1.19
date	96.05.07.23.15.58;	author wosch;	state Exp;
branches;
next	1.18;

1.18
date	96.01.11.17.49.55;	author phk;	state Exp;
branches;
next	1.17;

1.17
date	96.01.11.17.27.16;	author phk;	state Exp;
branches;
next	1.16;

1.16
date	96.01.11.03.45.55;	author jdp;	state Exp;
branches;
next	1.15;

1.15
date	95.08.26.13.17.39;	author joerg;	state Exp;
branches;
next	1.14;

1.14
date	95.03.04.17.46.23;	author nate;	state Exp;
branches
	1.14.4.1;
next	1.13;

1.13
date	94.09.18.19.41.38;	author swallace;	state Exp;
branches;
next	1.12;

1.12
date	94.08.28.18.48.32;	author bde;	state Exp;
branches;
next	1.11;

1.11
date	94.08.26.19.11.14;	author wollman;	state Exp;
branches;
next	1.10;

1.10
date	94.03.10.23.19.54;	author ats;	state Exp;
branches;
next	1.9;

1.9
date	94.02.13.20.42.48;	author jkh;	state Exp;
branches;
next	1.8;

1.8
date	94.01.03.18.35.54;	author davidg;	state Exp;
branches;
next	1.7;

1.7
date	93.12.11.21.05.59;	author jkh;	state Exp;
branches;
next	1.6;

1.6
date	93.11.25.01.06.42;	author jkh;	state Exp;
branches;
next	1.5;

1.5
date	93.11.22.19.05.26;	author jkh;	state Exp;
branches;
next	1.4;

1.4
date	93.11.09.04.44.29;	author paul;	state Exp;
branches;
next	1.3;

1.3
date	93.11.09.04.19.29;	author paul;	state Exp;
branches;
next	1.2;

1.2
date	93.11.07.03.25.25;	author paul;	state Exp;
branches;
next	1.1;

1.1
date	93.11.03.23.41.46;	author paul;	state Exp;
branches;
next	;

1.31.8.1
date	2005.01.18.04.43.01;	author trhodes;	state dead;
branches;
next	;

1.29.2.1
date	2001.04.25.10.41.00;	author ru;	state Exp;
branches;
next	1.29.2.2;

1.29.2.2
date	2002.07.17.13.25.18;	author ru;	state Exp;
branches;
next	1.29.2.3;

1.29.2.3
date	2012.11.17.07.24.13;	author svnexp;	state Exp;
branches;
next	;

1.27.2.1
date	99.08.29.15.03.58;	author peter;	state Exp;
branches;
next	;

1.21.2.1
date	97.05.08.07.11.32;	author asami;	state Exp;
branches;
next	;

1.14.4.1
date	95.08.30.07.05.48;	author davidg;	state Exp;
branches;
next	1.14.4.2;

1.14.4.2
date	96.05.02.16.14.02;	author jdp;	state Exp;
branches;
next	1.14.4.3;

1.14.4.3
date	96.05.29.22.36.14;	author jkh;	state Exp;
branches;
next	1.14.4.4;

1.14.4.4
date	96.06.05.02.40.55;	author jkh;	state Exp;
branches;
next	;


desc
@@


1.33
log
@Remove a.out runtime linker.  It doesn't build and was removed from the
build over two years ago by peter.

The binary a.out version of ld.so can be obtained from misc/compat22 or
src/lib/compat/compat22.

Discussed on:	-arch
Voted yes:	jhb, ru, linimon, delphij
@
text
@# $FreeBSD: src/libexec/rtld-aout/Makefile,v 1.32 2004/11/03 18:01:19 ru Exp $
PROG=	ld.so
SRCS=	mdprologue.S rtld.c shlib.c md.c support.c
MAN=	rtld.1aout
# As there is relocation going on behind GCC's back, don't cache function addresses.
PICFLAG=-fpic -fno-function-cse
CFLAGS+=-I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH} ${PICFLAG} -DRTLD -Wall
LDFLAGS+=-nostdlib -Wl,-Bshareable,-Bsymbolic,-assert,nosymbolic
ASFLAGS+=-k
DPADD+=	${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/}
LDADD+=	-lc_pic -lgcc_pic
INSTALLFLAGS=	-C		# -C to install as atomically as possible
PRECIOUSPROG=
MLINKS= rtld.1aout ld.so.1aout

.PATH: ${.CURDIR}/${MACHINE_ARCH}

.include <bsd.prog.mk>
@


1.32
log
@Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar
to PRECIOUSLIB from bsd.lib.mk.  The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.

Reviewed by:	oliver
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.31
log
@Fixed some of style bugs.
@
text
@d1 1
a1 1
# $FreeBSD: src/libexec/rtld-aout/Makefile,v 1.30 2001/03/26 14:22:08 ru Exp $
d12 2
a13 1
INSTALLFLAGS=	-fschg -C	# -C to install as atomically as possible
@


1.31.8.1
log
@MFC:

Remove a.out runtime linker.  It doesn't build and was removed from the
build over two years ago by peter.

The binary a.out version of ld.so can be obtained from misc/compat22 or
src/lib/compat/compat22.
@
text
@d1 1
a1 1
# $FreeBSD: src/libexec/rtld-aout/Makefile,v 1.31 2001/09/12 10:04:41 ru Exp $
@


1.30
log
@- Backout botched attempt to intoduce MANSECT feature.
- MAN[1-9] -> MAN.
@
text
@d1 1
a1 1
# $FreeBSD: src/libexec/rtld-aout/Makefile,v 1.29 2000/01/29 03:13:49 jdp Exp $
d12 1
a12 1
INSTALLFLAGS+=	-fschg -C	# -C to install as atomically as possible
@


1.29
log
@Move the man pages for the a.out dynamic linker into the 1aout
section.  I created rtld.1aout earlier with a repository copy.

This clears the way for the ELF dynamic linker man page, which I
will commit next.
@
text
@d1 1
a1 1
# $FreeBSD: src/libexec/rtld-aout/Makefile,v 1.28 1999/08/28 00:10:04 peter Exp $
d4 1
a4 1
MAN1aout=	rtld.1aout
@


1.29.2.1
log
@MFC: MAN[1-9] -> MAN.
@
text
@d1 1
a1 1
# $FreeBSD: src/libexec/rtld-aout/Makefile,v 1.29 2000/01/29 03:13:49 jdp Exp $
d4 1
a4 1
MAN=	rtld.1aout
@


1.29.2.2
log
@MFC: Fixed style of INSTALLFLAGS assignments.
@
text
@d1 1
a1 1
# $FreeBSD$
d12 1
a12 1
INSTALLFLAGS=	-fschg -C	# -C to install as atomically as possible
@


1.29.2.3
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/4/libexec/rtld-aout/Makefile 100238 2002-07-17 13:25:20Z ru $
@


1.28
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
d4 1
a4 1
MAN1=	rtld.1
d13 1
a13 1
MLINKS= rtld.1 ld.so.1
@


1.27
log
@Chaneg MACHINE to MACHINE_ARCH to support MACHINE=pc98.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.26 1998/06/01 13:00:32 peter Exp $
@


1.27.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.26
log
@Seperate the Paul Kranenburg a.out rtld stuff into a stand-alone area away
from the gpl ld code.  This is part 2 of something that I began in 1996.
A repository copy has happened behind cvs's back.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.25 1997/11/29 03:32:46 jdp Exp $
d7 1
a7 1
CFLAGS+=-I${.CURDIR} -I${.CURDIR}/${MACHINE} ${PICFLAG} -DRTLD -Wall
d15 1
a15 1
.PATH: ${.CURDIR}/${MACHINE}
@


1.25
log
@Get rid of the dynamic linker's internal malloc package, and arrange
things so that it uses the same malloc as is used by the program
being executed.  This has several advantages, the big one being
that you can now debug core dumps from dynamically linked programs
and get useful information out of them.  Until now, that didn't
work.  The internal malloc package placed the tables describing
the loaded shared libraries in a mapped region of high memory that
was not written to core files.  Thus the debugger had no way of
determining what was loaded where in memory.  Now that the dynamic
linker uses the application's malloc package (normally, but not
necessarily, the system malloc), its tables end up in the regular
heap area where they will be included in core dumps.  The debugger
now works very well indeed, thank you very much.

Also ...

Bring the program a little closer to conformance with style(9).
There is still a long way to go.

Add minimal const correctness changes to get rid of compiler warnings
caused by the recent const changes in <dlfcn.h> and <link.h>.

Improve performance by eliminating redundant calculations of symbols'
hash values.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.24 1997/04/16 11:31:32 bde Exp $
a4 1
LDDIR?= $(.CURDIR)/..
d7 1
a7 1
CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) $(PICFLAG) -DRTLD -Wall
a11 1
BINDIR= /usr/libexec
d15 1
a15 1
.PATH: $(LDDIR) $(LDDIR)/$(MACHINE)
@


1.24
log
@Fixed `make depend' and related bogons.  LDFLAGS was used for
ld-specific flags.  LDFLAGS is really for ld-related flags for cc,
not for ld, and some flags, e.g., -Bshareable, mean completely
different things to cc and ld.  Having the wrong things in LDFLAGS
also broke the standard ${PROG} target.  This was kludged around
by using a special rule that depended on LDFLAGS being bogus.
Fixing `make depend' broke the special rule but fixed the standard
rule (except in the DESTDIR case, which was handled more strictly
here than elsewhere).
@
text
@d1 1
a1 2
#	$Id: Makefile,v 1.23 1997/02/22 15:46:46 peter Exp $

d3 1
a3 1
SRCS=	mdprologue.S rtld.c malloc.c shlib.c md.c support.c sbrk.c
d8 2
a9 2
CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) $(PICFLAG) -DRTLD
LDFLAGS+=-nostdlib -Wl,-Bshareable -Wl,-Bsymbolic -Wl,-assert -Wl,nosymbolic
@


1.23
log
@Revert $FreeBSD$ to $Id$
@
text
@d1 1
a1 1
#	$Id$
d10 1
a10 1
LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic
a18 8

.if defined(DESTDIR)
$(PROG):
	$(LD) -o $(PROG) $(LDFLAGS) -nostdlib -L${DESTDIR}/usr/lib $(OBJS) $(LDADD)
.else
$(PROG):
	$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
.endif
@


1.22
log
@Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
@
text
@d1 1
a1 1
#	$FreeBSD$
@


1.21
log
@Update to handle new version ld.so.hints and info in executable for
configurable fallback search paths, as well as new crt interface version.

Also:
 - even faster getenv(), get all environment variable settings in a single
   pass.
 - ldd printf-like format specifications
 - minor code cleanups, one vsprintf -> vsnprintf (harmless)

The library search sequence is a little more complete now. Before,
it'd search $LD_LIBRARY_PATH (by opendir/readdir/closedir), then read
the hints file, then read /usr/lib (again by scanning thr directory).  It
would then fail if there was no "found" library.

Now, it does LD_LIBRARY_PATH and the hints file the same, but then uses
a longer fallback path.  The -R path is fetched from the executable if
specified at build time, the ldconfig path is appended, and /usr/lib is
appended to that. Duplicates are suppressed.  This means that simply
placing a new library in /usr/local/lib will work (the same as it did in
/usr/lib) without needing ldconfig -m.  It will find it quicker if the
ldconfig is run though.

Similar changes have been made to the NetBSD ld.so, but ours is rather
different now due to John Polstra's speedups and fixes from a while back.

The ldd printf-like format support came direct from NetBSD.

Reviewed by: nate, jdp
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.20 1996/09/12 03:42:54 bde Exp $
@


1.21.2.1
log
@Merge Bruce's de-bogosifying chagnes from -current (1.24).
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.21 1996/10/01 01:51:40 peter Exp $
d10 1
a10 1
LDFLAGS+=-nostdlib -Wl,-Bshareable -Wl,-Bsymbolic -Wl,-assert -Wl,nosymbolic
d19 8
@


1.20
log
@Use `install -C' instead of lots of shell commands to install ld.so
as atomically as possible.

(Immutable targets can't be renamed without opening a window when
neither the source nor the target is immutable.  Perhaps there
should be a rename_immutable syscall to do this if unsetting the
immutable flags would work.)
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.19 1996/05/07 23:15:58 wosch Exp $
d4 1
a4 1
SRCS=	mdprologue.S rtld.c malloc.c shlib.c etc.c md.c
d7 2
a8 1
PICFLAG=-fpic
d20 5
a24 1
$(PROG): ${OBJS} ${DPADD}
d26 1
@


1.19
log
@``mv'' -> ``mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.18 1996/01/11 17:49:55 phk Exp $
d14 1
a20 12

realinstall:
	${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
		${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROG}.new
	test -f ${DESTDIR}${BINDIR}/${PROG}.old && \
		chflags noschg ${DESTDIR}${BINDIR}/${PROG}.old || \
		:
	-chflags noschg ${DESTDIR}${BINDIR}/${PROG}
	-ln -f ${DESTDIR}${BINDIR}/${PROG} ${DESTDIR}${BINDIR}/${PROG}.old
	mv -f ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG}
	chflags schg ${DESTDIR}${BINDIR}/${PROG}
	-rm -f ${DESTDIR}${BINDIR}/${PROG}.old
@


1.18
log
@Another  '-' needed for make release.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.17 1996/01/11 17:27:16 phk Exp $
d29 1
a29 1
	mv ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG}
d31 1
a31 1
	-rm ${DESTDIR}${BINDIR}/${PROG}.old
@


1.17
log
@Make the new realinstall target a little less draconian so that make release
doesn't fall over.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.16 1996/01/11 03:45:55 jdp Exp $
d31 1
a31 1
	rm ${DESTDIR}${BINDIR}/${PROG}.old
@


1.16
log
@Install ld.so in a way that is safe even on a running system.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.15 1995/08/26 13:17:39 joerg Exp $
d27 2
a28 2
	chflags noschg ${DESTDIR}${BINDIR}/${PROG}
	ln -f ${DESTDIR}${BINDIR}/${PROG} ${DESTDIR}${BINDIR}/${PROG}.old
@


1.15
log
@Import Paul Kranenburg's man page for ld.so (aka. rtld).

Obtained from:	NetBSD
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.14 1995/03/04 17:46:23 nate Exp $
a13 1
INSTALLFLAGS+=	-fschg
d20 12
@


1.14
log
@Weak symbol support from NetBSD.  This should bring us in sync with the
NetBSD ld code except for local changes for dlopen() and friends and
the hashing on the minor value of the shlibs.  We should be binary
compatible now with all their libraries.

Obtained from: NetBSD
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.13 1994/09/18 19:41:38 swallace Exp $
d5 1
a5 1
NOMAN=	noman
d15 1
@


1.14.4.1
log
@Brought in changes from main branch: add rtld.1 man page.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.14 1995/03/04 17:46:23 nate Exp $
d5 1
a5 1
MAN1=	rtld.1
a14 1
MLINKS= rtld.1 ld.so.1
@


1.14.4.2
log
@Bring in changes from main branch.

Makefile 1.15 -> 1.18: Safer installation on a running system.
rtld.1   1.2  -> 1.3:  Add LD_PRELOAD, remove LD_NO_INTERN_SEARCH and
                       LD_NOSTD_PATH.
rtld.c   1.27 -> 1.33: Major speedups, code cleanups, LD_PRELOAD support.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.14.4.1 1995/08/30 07:05:48 davidg Exp $
d14 1
a20 12

realinstall:
	${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
		${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROG}.new
	test -f ${DESTDIR}${BINDIR}/${PROG}.old && \
		chflags noschg ${DESTDIR}${BINDIR}/${PROG}.old || \
		:
	-chflags noschg ${DESTDIR}${BINDIR}/${PROG}
	-ln -f ${DESTDIR}${BINDIR}/${PROG} ${DESTDIR}${BINDIR}/${PROG}.old
	mv ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG}
	chflags schg ${DESTDIR}${BINDIR}/${PROG}
	-rm ${DESTDIR}${BINDIR}/${PROG}.old
@


1.14.4.3
log
@Merge from HEAD, except:

	Clients that used gnumalloc still do, despite the merge.  We're not
	bringing phkmalloc over.

	Thread stuff left out.

	PCCARD support left out.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.14.4.2 1996/05/02 16:14:02 jdp Exp $
d29 1
a29 1
	mv -f ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG}
d31 1
a31 1
	-rm -f ${DESTDIR}${BINDIR}/${PROG}.old
@


1.14.4.4
log
@This 3rd mega-commit should hopefully bring us back to where we were.
I can get it to `make world' succesfully, anyway!
@
text
@d29 1
a29 1
	mv ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG}
d31 1
a31 1
	-rm ${DESTDIR}${BINDIR}/${PROG}.old
@


1.13
log
@Add LDDESTDIR to ld command.
Add -I${DESTDIR}/usr/include to cpp command.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.12 1994/08/28 18:48:32 bde Exp $
a6 1
#PICFLAG=-pic
a15 2
.SUFFIXES: .S

d19 1
a19 8
	$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDDESTDIR) $(LDADD)

.S.o:
.if defined(DESTDIR)
	${CPP} -I${DESTDIR}/usr/include ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET} -
.else
	${CPP} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET} -
.endif
@


1.12
log
@Add dependencies on libraries to DPADD.  Someday this should be done
automagically.  -lfoo has to be right to work, but ${LIBFO0} is too
easy to forget or misspell; nothing checks it and it should be
different for shared libraries.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.11 1994/08/26 19:11:14 wollman Exp $
d22 1
a22 1
	$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
d25 3
d29 1
@


1.11
log
@Install ld.so immutable.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.10 1994/03/10 23:19:54 ats Exp $
d12 1
d21 1
a21 1
$(PROG):
@


1.10
log
@Due to the deletion of the gcc support from libc we need again the
-lgcc_pic library. rtld uses the udivd3 routine from it.
Repeat the bug by simply compiling ld on current.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.9 1994/02/13 20:42:48 jkh Exp $
d14 1
@


1.9
log
@This is Paul K's latest set of ld changes.  A commit was necessary at this
late stage due to the fact that link.h was copyright Sun Microsystems.

This version of ld sync's us up with NetBSD's ld and supports compatablily
with NetBSD's -[zZ] flags (which we had reversed).  Compiling with this
new ld will give you RRS warnings for libraries which do not contain .type
infomation - these wsarnings are harmless and will go away as soon as you
recompile your libraries (cd /usr/src; make libraries).
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.8 1994/01/28 21:01:20 pk Exp $
d12 1
a12 1
LDADD+=	-lc_pic
@


1.8
log
@Implemented 'QMAGIC' a.out format correctly, and changed the default
output to be QMAGIC.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.7 1993/12/11 21:05:59 jkh Exp $
d4 1
a4 1
SRCS=	mdprologue.S sbrk.c rtld.c shlib.c etc.c md.c
d9 4
a12 3
CFLAGS += -I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) -O $(PICFLAG) -DRTLD
LDFLAGS = -Bshareable -Bsymbolic -assert nosymbolic -Z
LIBS =  -lc_pic -lgcc_pic
a13 1
ASFLAGS = -k
d15 2
a18 2
.SUFFIXES: .S

d20 1
a20 1
	$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS) $(LDADD)
d23 1
a23 1
	$(CPP) $(.IMPSRC) | $(AS) $(ASFLAGS) -o $(.TARGET) -
@


1.7
log
@Broke sbrk() out of rtld as part of general cleanup.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.6 1993/11/25 01:06:42 jkh Exp $
d10 1
a10 1
LDFLAGS = -Bshareable -Bsymbolic -assert nosymbolic
@


1.6
log
@Added -lgcc_pic back again.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.5 1993/11/22 19:05:26 jkh Exp $
d4 1
a4 1
SRCS=	mdprologue.S rtld.c shlib.c etc.c md.c
d13 1
d23 1
a23 1
	$(CPP) $(.IMPSRC) | $(AS) -k -o $(.TARGET) -
@


1.5
log
@Some of the latest changes from Paul K (taken from NetBSD-current).
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.4 1993/11/09 04:44:29 paul Exp $
d11 1
a11 1
LIBS =  -lc_pic
@


1.4
log
@Added -lgcc_pic to Makefile  -- Why do we need this and NetBSD don't ??

Incorporated patch by Guido (inspired by Davidg) that fixes stack
problem. May not be final fix but it works more than the current method.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.3 1993/11/09 04:19:29 paul Exp $
d11 1
a11 1
LIBS =  -lc_pic -lgcc_pic
@


1.3
log
@Updated to newest ld from pk.

lib.c:
Pull in archives containing definitions needed by shared objects.
warnings.c:
Less spurious "undefined symbol" msgs for shared library defined
symbols.
ld.c:
Do a better job of recognising data in text segments, eg. `const char []'.
shlib.c,ld/rtld/{Makefile rtld.c}
Use strsep() in stead of strtok() and restore colons in eg. env. vars.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.3 1993/11/08 13:20:39 pk Exp $
d11 1
a11 1
LIBS =  -lc_pic
@


1.2
log
@Added -lgcc_pic to LDFLAGS in rtld/Makefile
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.1 1993/11/03 23:41:46 paul Exp $
d11 1
a11 1
LIBS =  -lc_pic -lgcc_pic
d19 1
a19 1
	$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS)
@


1.1
log
@Imported NetBSD's ld for shared libs.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.2 1993/10/27 00:55:24 pk Exp $
d11 1
a11 1
LIBS =  -lc_pic
@
