|
From: Nicholas N. <nj...@ca...> - 2004-07-28 10:02:41
|
On Wed, 28 Jul 2004, Nicholas Nethercote wrote: >> That seems OK, but I think I put the second as_pad there deliberately, >> even though its redundant. Mainly, I think, to reduce the number of >> implicit dependencies between stage1 and stage2. The as_pad in stage1 >> is functionally there to make sure that stage2 loads in the right place; >> the one in stage2 is to make sure the tools load in the right place. >> >> Hm, it isn't a very strong reason for keeping it there. > > Especially since stage2 aborts if stage1 didn't launch it. And there doesn't > seem to be any use in allowing the possibility of stage2 being launched on > its own? Here's a more compelling patch: I've rejigged as_*() so that no implicit state is kept in global variables in ume.c; the padfile fd is now threaded through explicitly. The as_*() interface has changed from this void as_pad(void *start, void *end); void as_unpad(void *start, void *end); void as_closepadfile(void); int as_getpadfd(void); void as_setpadfd(int); to this int as_openpadfile (void); void as_pad (void *start, void *end, int padfile); void as_unpad (void *start, void *end, int padfile); void as_closepadfile(int padfile); which is a definite improvement. Jeremy, can you check this? If there are no complaints I'll commit. ---- While I'm at it, I noticed the function declarations in ume.h do not have "extern" -- does this matter? N |