From owner-freebsd-bugs@freebsd.org Sat Oct 1 02:05:09 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A568C0385D for ; Sat, 1 Oct 2016 02:05:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52D8011F for ; Sat, 1 Oct 2016 02:05:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u91259pX029204 for ; Sat, 1 Oct 2016 02:05:09 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 213137] boot2 too large when using gcc-4.6 or later Date: Sat, 01 Oct 2016 02:05:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: nigoro.dev@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 02:05:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213137 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@FreeBSD.org Reporter: nigoro.dev@gmail.com Created attachment 175328 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D175328&action= =3Dedit 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=3Doptimize | 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=3Dgcc46 make Part of log) gcc46 -fomit-frame-pointer -mrtd -mregparm=3D3 -DUSE_XREAD -DUFS1_AND_U= FS2=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 -Os -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=3D17a1 text=3D0 data=3D0 bss=3D0 entry=3D0 output: fmt=3Dbin size=3D2031 text=3D200 data=3D1e31 org=3D0 entry=3D0 -561 bytes available *** Error code 1 --=20 You are receiving this mail because: You are the assignee for the bug.=