> > - zbsdmod.o has 5MB buffers to store a copied kernel binary
> > - zbsdmod.o reads a kernel from the 5MB buffer and loads sections
> >   into the target addresses
> >  
> > https://nxr.netbsd.org/xref/src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c?r=1.12#94
> 
> Ah ok - thanks for explanation. So the dropping of ctf sections makes sense.

Yes.

> The missing COPTS was an accident or fallout from some other changes?

Isn't it specified in -current?
I think -O2 comes from MI src/sys/conf/Makefile.kern.inc:
 https://nxr.netbsd.org/xref/src/sys/conf/Makefile.kern.inc?r=1.268#69

On netbsd-9, GENERIC build uses -O2:
---
% /s/netbsd-9/src/obj.zaurus/tooldir.NetBSD-9.0_RC1-i386/bin/nbmake-zaurus 
init_main.o
#   compile  GENERIC/init_main.o
/s/netbsd-9/src/obj.zaurus/tooldir.NetBSD-9.0_RC1-i386/bin/arm--netbsdelf-eabi-gcc
 -mfloat-abi=soft -ffreestanding -fno-zero-initialized-in-bss 
-fno-delete-null-pointer-checks -O2 -msoft-float -fno-strict-aliasing 
-fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length 
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition 
-Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code 
-Wno-pointer-sign -Wno-attributes -Wno-sign-compare -mcpu=xscale 
--sysroot=/s/netbsd-9/src/obj.zaurus/destdir.zaurus -Dzaurus -I. 
-I../../../../external/bsd/libnv/dist -I../../../../../common/lib/libx86emu 
-I../../../../../common/lib/libc/misc -I../../../../../common/include 
-I../../../../arch -I../../../.. -nostdinc -DCOMPAT_UTILS -DCOMPAT_44 
-DDIAGNOSTIC -DW100_LCD_WRITETHROUGH -D_KERNEL -D_KERNEL_OPT -std=gnu99 
-I../../../../lib/libkern/../../../common/lib/libc/quad 
-I../../../../lib/libkern/../../../common/lib/libc/string 
-I../../../../lib/libker!
 n/../../../common/lib/libc/arch/arm/string -c ../../../../kern/init_main.c -o 
init_main.o
/s/netbsd-9/src/obj.zaurus/tooldir.NetBSD-9.0_RC1-i386/bin/nbctfconvert -g -L 
VERSION init_main.o
---

zaurus/conf/INSTALL has COPTS="-Os" in its config, though.

---
Izumi Tsutsui

Reply via email to