Re: [Etherboot-developers] Retiring RELOC
Brought to you by:
marty_connor,
stefanhajnoczi
From: <ke...@et...> - 2003-12-31 03:32:34
|
>You've mentioned in an off-list mail that the prefix stack is currently: > > loader.S | XXXprefix.S > start16.S > decompressor (for .z* images only) > start32.S (actually linked into main "program") > main > >Provided that the code in start16.S and the decompressor is all PIC (which >I think it is; please correct me if not), then these aren't a problem. >Looking at the top of start32.S, it is certainly manipulating the GDT and >has comments like "See where I am running". It looks as though it might >be setting up the GDT so that the virtual execution base *is* RELOC[ADDR] >before jumping to the C code, but I'm not sure without studying it in more >depth. There aren't any references to RELOC[ADDR] in start32.S, however, >which makes me dubious. > >If start32.S doesn't currently do this, is there any reason why it >shouldn't be altered to do so? I think you might be right, it looks like virt_offset is used to set up the base in the GDT register so that non-PIC code will execute fine from the current address. It looks like you'll have to somehow let start32.S know what the desired virtual base is if it will not be implied in the current address. Eric can confirm this. |