Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Oct 2016 00:04:01 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 213137] boot2 too large when using gcc-4.6 or later
Message-ID:  <bug-213137-8-O6SFWp3eZF@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-213137-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-213137-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213137

--- Comment #3 from Yuta Satoh <nigoro.dev@gmail.com> ---
(In reply to Dimitry Andric from comment #2)
When using gcc-5.4.0, get a error is too large as well.
When you disable fasynchronous-unwind-tables, it fits in the correct size.

# gcc5 -v
<snip>
gcc version 5.4.0 (FreeBSD Ports Collection)

# gcc5 -Os -Q --help=3Doptimize | grep unwind-tables
  -fasynchronous-unwind-tables          [enabled]
  -funwind-tables                       [disabled]

# cd /usr/src/sys/boot
# CC=3Dgcc5 make

Part of error log)
gcc5 -fomit-frame-pointer  -mrtd  -mregparm=3D3  -DUSE_XREAD  -DUFS1_AND_UF=
S2=20
-DFLAGS=3D0x80  -DSIOPRT=3D0x3f8  -DSIOFMT=3D0x3  -DSIOSPD=3D9600=20
-I/usr/src/sys/boot/i386/boot2/../../common=20
-I/usr/src/sys/boot/i386/boot2/../btx/lib -I.  -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align  -Wmissing-declarations -Wmissing-prototyp=
es
-Wnested-externs  -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-stri=
ngs=20
-Winline -march=3Di386 -ffreestanding -mno-mmx -mno-sse  -msoft-float -m32 =
-g=20
-std=3Dgnu99  -Wno-error=3Dunused-function -Wno-error=3Denum-compare
-Wno-error=3Dlogical-not-parentheses -Wno-error=3Dbool-compare
-Wno-error=3Duninitialized -Wno-error=3Darray-bounds -Wno-error=3Dclobbered
-Wno-error=3Dcast-align -Wno-error=3Dextra -Wno-error=3Dattributes -Wno-err=
or=3Dinline
-Wno-error=3Dunused-but-set-variable -Wno-error=3Dunused-value
-Wno-error=3Dstrict-aliasing -Wno-error=3Daddress   -Os=20
-fno-guess-branch-probability  -fno-unit-at-a-time  --param
max-inline-insns-single=3D100 -mpreferred-stack-boundary=3D2   -m32  -c sio=
.S -o
sio.o
ld -static -N --gc-sections -m elf_i386_fbsd -Ttext 0x2000 -o boot2.out
/usr/src/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 /usr/src/sys/boot/i386/boot2/../btx/btx/btx -l
boot2.ldr  -o boot2.ld -P 1 boot2.bin
kernel: ver=3D1.02 size=3D690 load=3D9000 entry=3D9010 map=3D16M pgctl=3D1:1
client: fmt=3Dbin size=3D174d text=3D0 data=3D0 bss=3D0 entry=3D0
output: fmt=3Dbin size=3D1fdd text=3D200 data=3D1ddd org=3D0 entry=3D0
-477 bytes available



Part of log to add -fno-asynchronous-unwind-tables)
gcc5 -fomit-frame-pointer  -mrtd  -mregparm=3D3  -DUSE_XREAD  -DUFS1_AND_UF=
S2=20
-DFLAGS=3D0x80  -DSIOPRT=3D0x3f8  -DSIOFMT=3D0x3  -DSIOSPD=3D9600=20
-I/usr/src/sys/boot/i386/boot2/../../common=20
-I/usr/src/sys/boot/i386/boot2/../btx/lib -I.  -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align  -Wmissing-declarations -Wmissing-prototyp=
es
-Wnested-externs  -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-stri=
ngs=20
-Winline -march=3Di386 -ffreestanding -mno-mmx -mno-sse  -msoft-float -m32 =
-g=20
-std=3Dgnu99  -Wno-error=3Dunused-function -Wno-error=3Denum-compare
-Wno-error=3Dlogical-not-parentheses -Wno-error=3Dbool-compare
-Wno-error=3Duninitialized -Wno-error=3Darray-bounds -Wno-error=3Dclobbered
-Wno-error=3Dcast-align -Wno-error=3Dextra -Wno-error=3Dattributes -Wno-err=
or=3Dinline
-Wno-error=3Dunused-but-set-variable -Wno-error=3Dunused-value
-Wno-error=3Dstrict-aliasing -Wno-error=3Daddress   -Os=20
-fno-guess-branch-probability  -fno-unit-at-a-time  --param
max-inline-insns-single=3D100 -fno-asynchronous-unwind-tables
-mpreferred-stack-boundary=3D2   -m32  -c sio.S -o sio.o
ld -static -N --gc-sections -m elf_i386_fbsd -Ttext 0x2000 -o boot2.out
/usr/src/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 /usr/src/sys/boot/i386/boot2/../btx/btx/btx -l
boot2.ldr  -o boot2.ld -P 1 boot2.bin
kernel: ver=3D1.02 size=3D690 load=3D9000 entry=3D9010 map=3D16M pgctl=3D1:1
client: fmt=3Dbin size=3D13ff text=3D0 data=3D0 bss=3D0 entry=3D0
output: fmt=3Dbin size=3D1c8f text=3D200 data=3D1a8f org=3D0 entry=3D0
369 bytes available
dd if=3Dboot2.ld of=3Dboot2 obs=3D7680 conv=3Dosync status=3Dnone
cat boot1 boot2 > boot

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213137-8-O6SFWp3eZF>