Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VxaUI-000752-Q1 for mharc-grub-devel@gnu.org; Mon, 30 Dec 2013 05:54:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxaU9-0006su-Sq for grub-devel@gnu.org; Mon, 30 Dec 2013 05:54:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxaU2-00037E-Ji for grub-devel@gnu.org; Mon, 30 Dec 2013 05:54:13 -0500 Received: from benson.vm.bytemark.co.uk ([212.110.190.137]:44005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxaU2-000379-DC for grub-devel@gnu.org; Mon, 30 Dec 2013 05:54:06 -0500 Received: from cpc22-cmbg14-2-0-cust482.5-4.cable.virginm.net ([86.6.25.227] helo=[192.168.1.7]) by benson.vm.bytemark.co.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1VxaU1-0004uI-Ie; Mon, 30 Dec 2013 10:54:05 +0000 Message-ID: <1388400844.30225.17.camel@dagon.hellion.org.uk> Subject: Re: [PATCH 6/7] mkimage: support images which require full relocation at mkimage time. From: Ian Campbell To: Leif Lindholm Date: Mon, 30 Dec 2013 10:54:04 +0000 In-Reply-To: <20131229225300.GA29433@bivouac.eciton.net> References: <1388342839.32105.25.camel@hastur.hellion.org.uk> <1388342856-18317-6-git-send-email-ijc@hellion.org.uk> <20131229225300.GA29433@bivouac.eciton.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.4.4-4+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.110.190.137 Cc: grub-devel@gnu.org, Vladimir Serbinenko X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 10:54:21 -0000 On Sun, 2013-12-29 at 22:53 +0000, Leif Lindholm wrote: > > diff --git a/util/grub-mkimage.c b/util/grub-mkimage.c > > index a2bd4c1..267beaa 100644 > > --- a/util/grub-mkimage.c > > +++ b/util/grub-mkimage.c > > @@ -65,6 +65,7 @@ static struct argp_option options[] = { > > /* TRANSLATORS: platform here isn't identifier. It can be translated. */ > > N_("use images and modules under DIR [default=%s/]"), 0}, > > {"prefix", 'p', N_("DIR"), 0, N_("set prefix directory [default=%s]"), 0}, > > + {"target-address", 'T', N_("ADDR"), 0, N_("set kernel target address [default=%d]"), 0}, > > For this to actually print a default value, you need to also update > the help_filter function. Also, you probably want a %p here. I hadn't noticed that, but given the lack of any default in the above it now seems obvious. Thanks. [...] > (Of course, you probably want to abstract away the ARM_UBOOT bit...) That might be tricky in practice -- what do you do if the user hasn't given any target yet? I'm more than a little inclined to suggest that this ought to say (literally) "[default=PLATFORM-SPECIFIC]" or something non-committal. A lot simpler with no odd corner cases. [...] > > - *reloc_size = SUFFIX (make_reloc_section) (e, reloc_section, > > - section_vaddresses, sections, > > - section_entsize, num_sections, > > - strtab, ia64jmp_off > > - + image_target->vaddr_offset, > > - 2 * ia64jmpnum + (got / 8), > > - image_target); > > + if (!grub_image_needs_abs_reloc(image_target)) > > + *reloc_size = SUFFIX (make_reloc_section) (e, reloc_section, > > + section_vaddresses, sections, > > + section_entsize, num_sections, > > + strtab, ia64jmp_off > > + + image_target->vaddr_offset, > > + 2 * ia64jmpnum + (got / 8), > > + image_target); > > The above is only indentation changes? Other than the addition of the if conditional, the rest is just the indentation changes arising from that addition. Ian.