From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1eoHIX-0001c5-Ic for mharc-grub-devel@gnu.org; Tue, 20 Feb 2018 18:26:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoHIU-0001aK-TK for grub-devel@gnu.org; Tue, 20 Feb 2018 18:26:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoHIR-0002te-Mq for grub-devel@gnu.org; Tue, 20 Feb 2018 18:26:06 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40976 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoHIR-0002tP-Ia for grub-devel@gnu.org; Tue, 20 Feb 2018 18:26:03 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 306048424D; Tue, 20 Feb 2018 23:26:03 +0000 (UTC) Received: from redhat.com (dhcp-10-20-1-221.bss.redhat.com [10.20.1.221]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12D97202699C; Tue, 20 Feb 2018 23:26:03 +0000 (UTC) Date: Tue, 20 Feb 2018 18:26:01 -0500 From: Peter Jones To: Daniel Kiper Cc: grub-devel@gnu.org Subject: Re: [PATCH 1/2] mkimage: avoid copying relocations for sections that won't be copied. Message-ID: <20180220232443.hs3u75ghseb2mgfq@redhat.com> References: <20180131162700.21473-1-pjones@redhat.com> <20180220144844.GA29532@router-fw-old.local.net-space.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180220144844.GA29532@router-fw-old.local.net-space.pl> User-Agent: NeoMutt/20171215 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 20 Feb 2018 23:26:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 20 Feb 2018 23:26:03 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pjones@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Feb 2018 23:26:07 -0000 On Tue, Feb 20, 2018 at 03:48:44PM +0100, Daniel Kiper wrote: > On Wed, Jan 31, 2018 at 11:26:59AM -0500, Peter Jones wrote: > > +static int > > +SUFFIX (is_kept_section) (Elf_Shdr *s, const struct grub_install_image_target_desc *image_target); > > +static int > > +SUFFIX (is_kept_reloc_section) (Elf_Shdr *s, const struct grub_install_image_target_desc *image_target, > > + Elf_Shdr *sections, Elf_Half section_entsize, Elf_Half num_sections, > > + const char *strtab); > > Ugh... Could not you create a struct and pass the pointer to it here? Fair enough - I did it that way because the whole file seems averse to that sort of thing, and once you start doing it, it gets a bit messy. Nevertheless, I'll send you a patchset that includes that in just a few minutes. > PS Please CC me on the patches next time. Will do. -- Peter