summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/conf/Makefile.pc9819
-rw-r--r--sys/pc98/conf/Makefile.pc9819
2 files changed, 32 insertions, 6 deletions
diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98
index a5245c7..64a91b0 100644
--- a/sys/conf/Makefile.pc98
+++ b/sys/conf/Makefile.pc98
@@ -3,7 +3,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.pc98,v 1.39 1998/09/16 08:04:40 kato Exp $
+# $Id: Makefile.pc98,v 1.40 1998/09/22 16:11:08 kato Exp $
#
# Makefile for FreeBSD
#
@@ -104,11 +104,14 @@ SYSTEM_LD_TAIL= @echo rearranging symbols; \
size -aout ${.TARGET} ; chmod 755 ${.TARGET}
.endif
.if ${KERNFORMAT} == elf
+# kld compatable export of symbols.
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
- setdef1.o
-SYSTEM_LD= @${LD} -elf -Bstatic -Ttext ${LOAD_ADDRESS} -e btext -defsym _DYNAMIC=0 \
+ setdef1.o hack.so
+SYSTEM_LD= @${LD} -elf -Bdynamic -T $S/i386/conf/kernel.script \
+ -export-dynamic -dynamic-linker /red/herring \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @size -elf ${.TARGET} ; chmod 755 ${.TARGET}
+SYSTEM_DEP+= $S/i386/conf/kernel.script
.endif
%BEFORE_DEPEND
@@ -147,6 +150,16 @@ symbols.sort: ${I386}/i386/symbols.raw
locore.o: ${I386}/i386/locore.s assym.s
${NORMAL_S}
+.if ${KERNFORMAT} == elf
+# This is a hack. BFD "optimizes" away dynamic mode if there are no
+# dynamic references. We could probably do a '-Bforcedynamic' mode like
+# in the a.out ld. For now, this works.
+hack.so: Makefile
+ touch hack.c
+ ${CC} -elf -shared -nostdlib hack.c -o hack.so
+ rm -f hack.c
+.endif
+
setdef0.o: ${I386}/i386/setdef0.c setdefs.h
${NORMAL_C}
diff --git a/sys/pc98/conf/Makefile.pc98 b/sys/pc98/conf/Makefile.pc98
index a5245c7..64a91b0 100644
--- a/sys/pc98/conf/Makefile.pc98
+++ b/sys/pc98/conf/Makefile.pc98
@@ -3,7 +3,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
-# $Id: Makefile.pc98,v 1.39 1998/09/16 08:04:40 kato Exp $
+# $Id: Makefile.pc98,v 1.40 1998/09/22 16:11:08 kato Exp $
#
# Makefile for FreeBSD
#
@@ -104,11 +104,14 @@ SYSTEM_LD_TAIL= @echo rearranging symbols; \
size -aout ${.TARGET} ; chmod 755 ${.TARGET}
.endif
.if ${KERNFORMAT} == elf
+# kld compatable export of symbols.
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
- setdef1.o
-SYSTEM_LD= @${LD} -elf -Bstatic -Ttext ${LOAD_ADDRESS} -e btext -defsym _DYNAMIC=0 \
+ setdef1.o hack.so
+SYSTEM_LD= @${LD} -elf -Bdynamic -T $S/i386/conf/kernel.script \
+ -export-dynamic -dynamic-linker /red/herring \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @size -elf ${.TARGET} ; chmod 755 ${.TARGET}
+SYSTEM_DEP+= $S/i386/conf/kernel.script
.endif
%BEFORE_DEPEND
@@ -147,6 +150,16 @@ symbols.sort: ${I386}/i386/symbols.raw
locore.o: ${I386}/i386/locore.s assym.s
${NORMAL_S}
+.if ${KERNFORMAT} == elf
+# This is a hack. BFD "optimizes" away dynamic mode if there are no
+# dynamic references. We could probably do a '-Bforcedynamic' mode like
+# in the a.out ld. For now, this works.
+hack.so: Makefile
+ touch hack.c
+ ${CC} -elf -shared -nostdlib hack.c -o hack.so
+ rm -f hack.c
+.endif
+
setdef0.o: ${I386}/i386/setdef0.c setdefs.h
${NORMAL_C}
OpenPOWER on IntegriCloud