Date: Thu, 8 Mar 2012 19:32:07 +0000 From: David Chisnall <dchisnall@pathscale.com> To: John Baldwin <jhb@FreeBSD.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>, "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>, src-committers@FreeBSD.org, Jung-uk Kim <jkim@FreeBSD.org> Subject: Re: svn commit: r232570 - head/sys/boot/i386/boot2 Message-ID: <09C8D743-8295-4F92-9332-D83F73B5F86D@FreeBSD.org> In-Reply-To: <201203081105.32334.jhb@freebsd.org> References: <201203051953.q25JrIS1002269@svn.freebsd.org> <201203071700.21259.jkim@FreeBSD.org> <201203081105.32334.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8 Mar 2012, at 16:05, John Baldwin wrote: > On Wednesday, March 07, 2012 5:00:19 pm Jung-uk Kim wrote: >> On Monday 05 March 2012 02:53 pm, John Baldwin wrote: >>> Author: jhb >>> Date: Mon Mar 5 19:53:17 2012 >>> New Revision: 232570 >>> URL: http://svn.freebsd.org/changeset/base/232570 >>>=20 >>> Log: >>> Fix boot2 to handle boot config files that only contain a custom >>> path to a loader or kernel. Specifically, kname cannot be pointed >>> at cmd[] since it's value is change to be an empty string after the >>> initial call to parse, and cmd[]'s value can be changed (thus >>> losing a prior setting for kname) due to user input at the boot >>> prompt. While here, ensure that that initial boot config file text >>> is nul-terminated, that ops is initialized to zero, and that kname >>> is always initialized to a valid string. >>=20 >> As many people pointed out, Clang overflows boot2 again after this=20 >> commit. Long long time ago, I asked this question on arch@: >>=20 >> http://docs.freebsd.org/cgi/mid.cgi?200509081418.47794.jkim >>=20 >> Why can't we do that now? Can't we build separate ufs1-only and=20 >> ufs2-only boot2's, at least? Having ufs1+ufs2 boot block is great=20 >> but I see very little benefit to support that in 2012. :-/ >=20 > As I said on the reply to current@, I think having separate boot = blocks will=20 > be a headache and PITA for our users. Let's see if we can get boot2 = to fit=20 > without breaking functionality first. It is a shame that gcc = outperforms=20 > clang so drastically in this case (gcc's boot2 is about 250 bytes = smaller than=20 > clang's). I'm going to take a look at the sequence of optimisations that are run = with -Os. It's currently mostly the same as -O2, which is probably not = ideal. I'll also see if I can create a .ll from boot2 that we can add = to the LLVM unit tests so that anyone who pushes it over the size = boundary will get a buildbot failure. David=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?09C8D743-8295-4F92-9332-D83F73B5F86D>