aboutsummaryrefslogtreecommitdiff
path: root/lib/csu
diff options
context:
space:
mode:
authorPaul Richards <paul@FreeBSD.org>1993-11-09 04:26:11 +0000
committerPaul Richards <paul@FreeBSD.org>1993-11-09 04:26:11 +0000
commitbfa077712ffca017eda0f6bb039eb9b55e5a0f14 (patch)
tree8dfd544d29d9b5814fe0f45006d73fc3fa18ff65 /lib/csu
parent3923b0019c438b595e77d8f73d62b37147df25f8 (diff)
downloadsrc-bfa077712ffca017eda0f6bb039eb9b55e5a0f14.tar.gz
src-bfa077712ffca017eda0f6bb039eb9b55e5a0f14.zip
shlib update:
Can get rid of local symbols with "ld -x -r" again. Made LDSO #ifdef DEBUG.
Notes
Notes: svn path=/head/; revision=741
Diffstat (limited to 'lib/csu')
-rw-r--r--lib/csu/i386/Makefile8
-rw-r--r--lib/csu/i386/crt0.c9
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/csu/i386/Makefile b/lib/csu/i386/Makefile
index 505308e7225e..01109f31edb3 100644
--- a/lib/csu/i386/Makefile
+++ b/lib/csu/i386/Makefile
@@ -1,7 +1,7 @@
# from: @(#)Makefile 5.6 (Berkeley) 5/22/91
-# $Id: Makefile,v 1.3 1993/11/04 01:09:08 paul Exp $
+# $Id: Makefile,v 1.4 1993/11/07 03:05:40 paul Exp $
-CFLAGS+= -DLIBC_SCCS #-DDYNAMIC
+CFLAGS+= -DLIBC_SCCS -DDYNAMIC
OBJS= crt0.o gcrt0.o
CLEANFILES+= gmon.o moncrt0.o core a.out
@@ -9,8 +9,8 @@ all: ${OBJS}
crt0.o: crt0.c
${CC} ${CFLAGS} -c -DCRT0 ${.ALLSRC}
-# ${LD} -x -r ${.TARGET}
-# mv a.out ${.TARGET}
+ ${LD} -x -r ${.TARGET}
+ mv a.out ${.TARGET}
moncrt0.o: crt0.c
${CC} ${CFLAGS} -c -DMCRT0 ${.ALLSRC} -o ${.TARGET}
diff --git a/lib/csu/i386/crt0.c b/lib/csu/i386/crt0.c
index 9f43b6610832..fdbe2c8a9bdf 100644
--- a/lib/csu/i386/crt0.c
+++ b/lib/csu/i386/crt0.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: crt0.c,v 1.7 1993/10/23 00:47:18 pk Exp $
+ * $Id: crt0.c,v 1.8 1993/11/04 10:51:41 pk Exp $
*/
@@ -209,6 +209,7 @@ start()
environ = targv;
#ifdef DYNAMIC
+ /* ld(1) convention: if DYNAMIC = 0 then statically linked */
#ifdef stupid_gcc
if (&_DYNAMIC)
__do_dynamic_link();
@@ -248,12 +249,10 @@ __do_dynamic_link ()
int dupzfd;
void (*entry)();
- /* ld(1) convention: if DYNAMIC = 0 then statically linked */
- if (&_DYNAMIC == (struct link_dynamic *)0)
- return;
-
+#ifdef DEBUG
/* Provision for alternate ld.so - security risk! */
if (!(ldso = _getenv("LDSO")))
+#endif
ldso = LDSO;
crt.crt_ldfd = open(ldso, 0, 0);