From: Keir Fraser Subject: Re: [PATCH] mkelf32: Correct sh_link Date: Wed, 03 Jan 2007 15:20:29 +0000 Message-ID: References: <200701031611.13006.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200701031611.13006.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 3/1/07 15:11, "Christoph Egger" wrote: > On Wednesday 03 January 2007 14:57, Keir Fraser wrote: >> SHT_PROGBITS sections do not use the sh_link field. It's used by >> symbol-table sections, relocation-entry sections, and suchlike, of which we >> don't have any. And .shstrtab section is never linked to. > > Why do you strip the symbol table and re-add it in an unusual format > when linking the bootable ELF image? Is this a historical relict? No bootloader would load a symbol table for us (where would it load it? How would it tell us about it?), so we have to internalise it into the PROGBITS section somehow. Stealing the Linux code to do this made sense. -- Keir