aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);