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