vers.c: ${VERSIONFILE} ${SOURCES} ${LIBLIST} ${.CURDIR}/../Makefile.boot
${HOST_SH} ${S}/conf/newvers_stand.sh ${VERSIONFILE} x86 ${NEWVERSWHAT}
+.if defined(__MINIX)
+# BJG
+# -Wl,-Ttext,0 changed to --section-start=.text=0 twice below of a gold problem.
+# did not leave both versions in because of the huge continued line.
+.endif
+
# Anything that calls 'real_to_prot' must have a %pc < 0x10000.
# We link the program, find the callers (all in libi386), then
# explicitly pull in the required objects before any other library code.
${PROG}: ${OBJS} ${LIBLIST} ${.CURDIR}/../Makefile.boot
${_MKTARGET_LINK}
- bb="$$( ${CC} -o ${PROG}.syms ${LDFLAGS} -Wl,-Ttext,0 -Wl,-cref \
+ bb="$$( ${CC} -o ${PROG}.syms ${LDFLAGS} -Wl,--section-start=.text=0 -Wl,-cref \
${OBJS} ${LIBLIST} | ( \
while read symbol file; do \
[ -z "$$file" ] && continue; \
do :; \
done; \
) )"; \
- ${CC} -o ${PROG}.syms ${LDFLAGS} -Wl,-Ttext,0 \
+ ${CC} -o ${PROG}.syms ${LDFLAGS} -Wl,--section-start=.text=0 \
-Wl,-Map,${PROG}.map -Wl,-cref ${OBJS} $$bb ${LIBLIST}
${OBJCOPY} -O binary ${PROG}.syms ${PROG}
${PROG}: ${OBJS} ${LIBLIST}
${_MKTARGET_LINK}
+.if defined(__MINIX)
+ ${CC} -o ${PROG}.sym ${LDFLAGS} -Wl,--section-start=.text=${PRIMARY_LOAD_ADDRESS} \
+ -T ${LDSCRIPT} -Wl,-Map,${PROG}.map -Wl,-cref ${OBJS} ${LIBLIST}
+.else
${CC} -o ${PROG}.sym ${LDFLAGS} -Wl,-Ttext,${PRIMARY_LOAD_ADDRESS} \
-T ${LDSCRIPT} -Wl,-Map,${PROG}.map -Wl,-cref ${OBJS} ${LIBLIST}
+.endif
${OBJCOPY} -O binary ${PROG}.sym ${PROG}
@ sz=$$(${TOOL_STAT} -f '%z' ${PROG}); \
if [ "$$sz" -gt "${BOOTXX_MAXSIZE}" ]; then \
${PROG}: ${OBJS}
${_MKTARGET_LINK}
+.if defined(__MINIX)
+ ${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,--section-start=.text=${PRIMARY_LOAD_ADDRESS} \
+ ${OBJS}
+.else
${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${PRIMARY_LOAD_ADDRESS} \
${OBJS}
+.endif
@ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<free_space\>' \
| ${TOOL_SED} 's/^0*//' ); \
echo "#### There are $$1 free bytes in ${PROG}"
${PROG}: ${OBJS}
${_MKTARGET_LINK}
+.if defined(__MINIX)
+ ${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,--section-start=.text=${LOADADDR} ${OBJS}
+.else
${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${LOADADDR} ${OBJS}
+.endif
@ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<mbr_space\>' \
| ${TOOL_SED} 's/^0*//' ); \
echo "#### There are $$1 free bytes in ${PROG}"