Module Name:    src
Committed By:   isaki
Date:           Fri Aug 14 03:54:46 UTC 2020

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

Log Message:
Reduce binary size as possible.  These reduce filesize about 20 words.
- Use word alignment (rather than longword alignment) for text/data section.
- Use short reference.  In the bootloader, all symbols can be expressed in
  short.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot
cvs rdiff -u -r1.8 -r1.9 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.16 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.17
--- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.16	Fri Aug 14 03:40:47 2020
+++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot	Fri Aug 14 03:54:46 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.xxboot,v 1.16 2020/08/14 03:40:47 isaki Exp $
+#	$NetBSD: Makefile.xxboot,v 1.17 2020/08/14 03:54:46 isaki Exp $
 
 NOMAN=		# defined
 
@@ -40,6 +40,7 @@ CPPFLAGS+= -DHEAP_START=0x00100000
 CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S}
 CPPFLAGS+= -I$M/stand/libiocs -I$M/stand/libsa -I$M/stand/common
 AFLAGS=	   ${CFLAGS:M-[ID]*}
+AFLAGS+=   -Wa,-l
 LINKFLAGS=   -n -Bstatic -T ${.CURDIR}/../xxboot.ldscript
 LINKFLAGS+=  --defsym=TEXTADDR=$(TEXT)
 LINKFLAGS+=  --defsym=BOOT_TEXTADDR=$(BOOT_TEXT)

Index: src/sys/arch/x68k/stand/xxboot/xxboot.ldscript
diff -u src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.8 src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.9
--- src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.8	Fri Aug 14 03:25:39 2020
+++ src/sys/arch/x68k/stand/xxboot/xxboot.ldscript	Fri Aug 14 03:54:46 2020
@@ -8,6 +8,8 @@ SECTIONS
 {
   . = TEXTADDR;
   .text :
+  ALIGN(2)
+  SUBALIGN(2)
   {
     CREATE_OBJECT_SYMBOLS
     *(.text)
@@ -24,6 +26,8 @@ SECTIONS
     _etext = .;
   }
   .data :
+  ALIGN(2)
+  SUBALIGN(2)
   {
     /* The first three sections are for SunOS dynamic linking.  */
     *(.dynamic)

Reply via email to