Module Name:    src
Committed By:   isaki
Date:           Fri Aug 14 03:25:39 UTC 2020

Modified Files:
        src/sys/arch/x68k/stand/xxboot: Makefile.xxboot xxboot.ldscript

Log Message:
- Restore display of first_kbyte.  This is helpful for development.
- Check the filesize of resulting file instead of section sizes.
  If there is a gap between sections, the filesize may be exceeded even
  though the section total is not exceeded.  Of course that doesn't
  usually happen but I've experienced this during development.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x68k/stand/xxboot/xxboot.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot
diff -u src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.13 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.14
--- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.13	Mon Aug 10 07:00:49 2020
+++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot	Fri Aug 14 03:25:39 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.xxboot,v 1.13 2020/08/10 07:00:49 rin Exp $
+#	$NetBSD: Makefile.xxboot,v 1.14 2020/08/14 03:25:39 isaki Exp $
 
 NOMAN=		# defined
 
@@ -61,10 +61,19 @@ SRCS+=	exec_image.S
 
 .include "${.CURDIR}/../../Makefile.booters"
 
+CLEANFILES+=	${PROG}.map
+
 
 ${PROG}: $(OBJS)
 	${_MKTARGET_LINK}
-	$(LD) $(LINKFLAGS) -o ${PROG} $(OBJS) $(LDLIBS)
+	$(LD) $(LINKFLAGS) -Map=${PROG}.map -o ${PROG} $(OBJS) $(LDLIBS)
+	: Print some addresses for convenience
+	@${TOOL_AWK} '/first_kbyte$$/ { print "\t\t" $$2 "\t" $$1 }' ${PROG}.map
+	@echo "		filesize	"`${TOOL_STAT} -f %z ${PROG}`
+	@if [ `${TOOL_STAT} -f %z ${PROG}` -gt 8192 ]; then \
+	    echo "${PROG} filesize exceeds 8192 bytes"; \
+		exit 1; \
+	fi
 	${TOUCHPROG}
 
 .include <bsd.prog.mk>

Index: src/sys/arch/x68k/stand/xxboot/xxboot.ldscript
diff -u src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.7 src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.8
--- src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.7	Tue Jan 28 11:57:22 2020
+++ src/sys/arch/x68k/stand/xxboot/xxboot.ldscript	Fri Aug 14 03:25:39 2020
@@ -48,6 +48,4 @@ SECTIONS
 }
 
 ASSERT(first_kbyte - TEXTADDR <= 1024, "Error: first_kbyte exceeds 1KB");
-ASSERT(_edata - TEXTADDR <= TEXTDATASIZE,
-    "Error: text+data is too large to bootarea");
 ASSERT(_end <= BOOT_TEXTADDR, "Error: _end conflicts BOOT_TEXT");

Reply via email to