Re: boot2 too large when built with BTX_SERIAL=yes

From: Sean Bruno <sbruno_at_ignoranthack.me>
Date: Mon, 28 Apr 2014 09:31:19 -0700
On Sat, 2014-04-26 at 21:15 -0400, Ryan Stone wrote:
> I've been seeing the following build failure on HEAD when I set
> BTX_SERIAL=yes in make.conf
> 
> btxld -v -E 0x2000 -f bin -b
> /usr/obj/repos/users/rstone/freebsd/sys/boot/i386/boot2/../btx/btx/btx
> -l boot2.ldr  -o boot2.ld -P 1 boot2.bin
> kernel: ver=1.02 size=6c0 load=9000 entry=9010 map=16M pgctl=1:1
> client: fmt=bin size=1551 text=0 data=0 bss=0 entry=0
> output: fmt=bin size=1e11 text=200 data=1c11 org=0 entry=0
> --- boot2 ---
> --- rescue.all__D ---
> --- init_make ---
> (cd /repos/users/rstone/freebsd/rescue/rescue/../../sbin/init &&  make
> -DRESCUE CRUNCH_CFLAGS=-DRESCUE DIRPRFX=rescue/rescue/init/ depend &&
> make -DRESCUE CRUNCH_CFLAGS=-DRESCUE DIRPRFX=rescue/rescue/init/
> init.o)
> --- sys.all__D ---
> -17 bytes available


confirmed, and gross:
sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s
rm -f boot2.s.tmp
cc  -m32 -c boot2.s
cc -Os  -fomit-frame-pointer  -mrtd  -mregparm=3  -DUSE_XREAD
-DUFS1_AND_UFS2  -DFLAGS=0x80  -DSIOPRT=0x3f8  -DSIOFMT=0x3
-DSIOSPD=115200
-I/home/sbruno/bsd/head/sys/boot/i386/boot2/../../common
-I/home/sbruno/bsd/head/sys/boot/i386/boot2/../btx/lib -I.  -Wall
-Waggregate-return -Wbad-function-cast -Wcast-align
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings  -Winline
-mstack-alignment=8 -mllvm -inline-threshold=3 -mllvm
-enable-load-pre=false -mllvm -simplifycfg-dup-ret -march=i386
-ffreestanding -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
-msoft-float -m32 -std=gnu99 -Qunused-arguments      -m32
-c /home/sbruno/bsd/head/sys/boot/i386/boot2/sio.S
ld -static -N --gc-sections -m elf_i386_fbsd -Ttext 0x2000 -o
boot2.out /var/tmp/home/sbruno/bsd/head/sys/boot/i386/boot2/../btx/lib/crt0.o boot2.o sio.o
objcopy -S -O binary boot2.out boot2.bin
btxld -v -E 0x2000 -f bin
-b /var/tmp/home/sbruno/bsd/head/sys/boot/i386/boot2/../btx/btx/btx -l
boot2.ldr  -o boot2.ld -P 1 boot2.bin
kernel: ver=1.02 size=6c0 load=9000 entry=9010 map=16M pgctl=1:1
client: fmt=bin size=1551 text=0 data=0 bss=0 entry=0
output: fmt=bin size=1e11 text=200 data=1c11 org=0 entry=0
-17 bytes available
*** Error code 1

Stop.
make[2]: stopped in /home/sbruno/bsd/head/sys/boot/i386/boot2
*** Error code 1

Stop.
make[1]: stopped in /home/sbruno/bsd/head/sys/boot/i386
*** Error code 1

Stop.
make: stopped in /home/sbruno/bsd/head/sys/boot



Received on Mon Apr 28 2014 - 14:31:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:48 UTC