svn commit: r205127 - projects/altix/sys/conf
Marcel Moolenaar
marcel at FreeBSD.org
Sat Mar 13 18:34:19 UTC 2010
Author: marcel
Date: Sat Mar 13 18:34:19 2010
New Revision: 205127
URL: http://svn.freebsd.org/changeset/base/205127
Log:
Go out on a limb and build the kernel proper as a relocatable as well.
This has some bigger consequences, but again it's much more easy to
work with relocatables in a NUMA environment.
In particular, the effects of this change are:
1. We can't load kernels any more -- not a big deal for Altix, because
we couldn't load kernels in the first place. We needed to load the
kernel at a fixed physical address (= 64M) and on Altix there's no
physical memory at that address.
2. The kernel object size increased by ~39%. The debug kernel object
file increased by about ~99%. Lastly, the symbols object file saw
about a 150% increase. Whether this is acceptable or not is left
for later to decide -- after we can compare the memory footprint.
3. The loader can't check for ET_EXEC to determine if the object is
the kernel proper or not. Consequently, we have no entry point. It
feels acceptable to expect the entry point to be called "__start"
or something along those lines. The kernel proper is the object
file that contains that symbol.
Modified:
projects/altix/sys/conf/kern.pre.mk
Modified: projects/altix/sys/conf/kern.pre.mk
==============================================================================
--- projects/altix/sys/conf/kern.pre.mk Sat Mar 13 18:14:51 2010 (r205126)
+++ projects/altix/sys/conf/kern.pre.mk Sat Mar 13 18:34:19 2010 (r205127)
@@ -141,13 +141,18 @@ SYSTEM_CFILES= config.c env.c hints.c vn
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
-SYSTEM_OBJS+= hack.So
.if defined(CTFMERGE)
SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o
LD+= -g
.endif
-SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \
- -warn-common -export-dynamic -dynamic-linker /red/herring \
+.if ${MACHINE_ARCH} != ia64
+SYSTEM_OBJS+= hack.So
+SYSTEM_LDFLAGS= -Bdynamic -T ${LDSCRIPT} -export-dynamic \
+ -dynamic-linker /red/herring
+.else
+SYSTEM_LDFLAGS= -r
+.endif
+SYSTEM_LD= @${LD} ${SYSTEM_LDFLAGS} -warn-common \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
${SIZE} ${.TARGET} ; chmod 755 ${.TARGET}
More information about the svn-src-projects
mailing list