Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/stand/xxboot Reduce binary size as possible. ...
details: https://anonhg.NetBSD.org/src/rev/377cba631b3b
branches: trunk
changeset: 974854:377cba631b3b
user: isaki <isaki%NetBSD.org@localhost>
date: Fri Aug 14 03:54:46 2020 +0000
description:
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.
diffstat:
sys/arch/x68k/stand/xxboot/Makefile.xxboot | 3 ++-
sys/arch/x68k/stand/xxboot/xxboot.ldscript | 4 ++++
2 files changed, 6 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r eb6a6f1199e0 -r 377cba631b3b sys/arch/x68k/stand/xxboot/Makefile.xxboot
--- a/sys/arch/x68k/stand/xxboot/Makefile.xxboot Fri Aug 14 03:43:28 2020 +0000
+++ b/sys/arch/x68k/stand/xxboot/Makefile.xxboot Fri Aug 14 03:54:46 2020 +0000
@@ -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+= -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)
diff -r eb6a6f1199e0 -r 377cba631b3b sys/arch/x68k/stand/xxboot/xxboot.ldscript
--- a/sys/arch/x68k/stand/xxboot/xxboot.ldscript Fri Aug 14 03:43:28 2020 +0000
+++ b/sys/arch/x68k/stand/xxboot/xxboot.ldscript Fri Aug 14 03:54:46 2020 +0000
@@ -8,6 +8,8 @@
{
. = TEXTADDR;
.text :
+ ALIGN(2)
+ SUBALIGN(2)
{
CREATE_OBJECT_SYMBOLS
*(.text)
@@ -24,6 +26,8 @@
_etext = .;
}
.data :
+ ALIGN(2)
+ SUBALIGN(2)
{
/* The first three sections are for SunOS dynamic linking. */
*(.dynamic)
Home |
Main Index |
Thread Index |
Old Index