shlib update:

Can get rid of local symbols with "ld -x -r" again.
Made LDSO #ifdef DEBUG.
This commit is contained in:
Paul Richards 1993-11-09 04:26:11 +00:00
parent 3923b0019c
commit bfa077712f
2 changed files with 8 additions and 9 deletions

View File

@ -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}

View File

@ -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);