[OpenBIOS] [PATCH] sparc32: avoid runtime relocations

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Mon Jan 3 14:57:48 CET 2011


On 02/01/11 16:54, Blue Swirl wrote:

> The Forth dictionary was relocated at run time, incurring also
> a copy operation. The source dictionary remained in memory.
> It was not possible to run forthstrap without any input files
> besides the base dictionary.
>
> Make forthstrap generate a hex dump which can be included in C,
> but also contains relocations, so that relocations are performed
> by the linker at compile time. Allow dictionary compilation
> with no source files.
>
> Don't allocate the dictionary dynamically; reduce ofmem supply
> accordingly.

This looks like a good idea in principle. My only comments would be that 
I think we should do it for all architectures, and also perhaps add some 
more comments in bootstrap.c explaining what is happening, particularly 
in relation to the relocation code section.

Oh - and I'm a little confused as to why there is a hard-coded filename 
for bootstrap.dict in there - should this be passed in as a parameter?


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the OpenBIOS mailing list