[Bug 213137] boot2 too large when using gcc-4.6 or later
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Oct 1 02:05:09 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213137
Bug ID: 213137
Summary: boot2 too large when using gcc-4.6 or later
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: nigoro.dev at gmail.com
Created attachment 175328
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=175328&action=edit
sample patch for sys/boot/i386/boot2/Makefile
If -fasynchronous-unwind-tables is enabled, the size of boot2 is too large.
# gcc46 -Os -Q --help=optimize | grep unwind-tables
-fasynchronous-unwind-tables [enabled]
-funwind-tables [disabled]
Steps to Reproduce)
# pkg install gcc46 (or new version that you want)
# cd /usr/src/sys/boot
# CC=gcc46 make
Part of log)
gcc46 -fomit-frame-pointer -mrtd -mregparm=3 -DUSE_XREAD -DUFS1_AND_UFS2
-DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600
-I/usr/src/sys/boot/i386/boot2/../../common
-I/usr/src/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 -march=i386 -ffreestanding -mno-mmx -mno-sse -msoft-float -m32 -g
-std=gnu99 -Os -fno-guess-branch-probability -fno-unit-at-a-time --param
max-inline-insns-single=100 -mpreferred-stack-boundary=2 -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=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1
client: fmt=bin size=17a1 text=0 data=0 bss=0 entry=0
output: fmt=bin size=2031 text=200 data=1e31 org=0 entry=0
-561 bytes available
*** Error code 1
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list