From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2VYF-0008SU-H8 for qemu-devel@nongnu.org; Thu, 25 Jul 2013 20:06:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2VYE-0004Jh-LB for qemu-devel@nongnu.org; Thu, 25 Jul 2013 20:06:31 -0400 Received: from mail-vc0-f178.google.com ([209.85.220.178]:38520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2VYE-0004Ja-Hb for qemu-devel@nongnu.org; Thu, 25 Jul 2013 20:06:30 -0400 Received: by mail-vc0-f178.google.com with SMTP id ha12so111143vcb.23 for ; Thu, 25 Jul 2013 17:06:29 -0700 (PDT) Date: Thu, 25 Jul 2013 20:06:27 -0400 From: Kevin O'Connor Message-ID: <20130726000627.GA14029@morn.localdomain> References: <1373211589-8097-1-git-send-email-mst@redhat.com> <1373211589-8097-2-git-send-email-mst@redhat.com> <20130714182452.GB7607@morn.localdomain> <20130715080102.GA31638@redhat.com> <20130725125555.GA761@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130725125555.GA761@redhat.com> Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH v2 1/5] linker: utility to patch in-memory ROM files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: seabios@seabios.org, qemu-devel@nongnu.org On Thu, Jul 25, 2013 at 03:55:56PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 15, 2013 at 11:01:02AM +0300, Michael S. Tsirkin wrote: > > On Sun, Jul 14, 2013 at 02:24:52PM -0400, Kevin O'Connor wrote: > > > I'd prefer to see this tracked within the "linker" code and not in the > > > generic romfile struct. > > > > A way to associate a romfile instance with a value seems generally > > useful, no? Still, that's not too hard - it would only mean an extra > > linked list of > > > > struct linker { > > char name[56] > > void *data; > > struct hlist_node node; > > } > > > > is this preferable? Sure, but it's probably easier to do something like: struct linkfiles { char *name; void *data; }; void linker_loader_execute(const char *name) { int size; struct linker_loader_entry_s *entries = romfile_loadfile(name, &size); int numentries = size/sizeof(entries[0]); if (! entries) return; struct linkfiles *files = malloc_tmp(sizeof(files[0]) * numentries); and then just populate and use the array of filenames. > > > Also, is there another name besides "linker" that could be used? > > > SeaBIOS has code to self-relocate and fixup code relocations. I think > > > having code in the repo called "linker" could cause confusion. > > > > > > > romfile_loader? Shrug. How about "tabledeploy"? -Kevin