[okl4-developer] Program link addresses
Joshua Root
jmr at cse.unsw.edu.au
Mon Jul 14 15:16:34 EST 2008
Geoffrey Lee wrote:
> On Fri, Jul 11, 2008 at 10:03:01PM +1000, Joshua Root wrote:
>
>>> The iguana/server program gets started as root server. For this,
>>> you should use the KengeProgram and WeaverRootProgram rather than
>>> the Iguana variants.
>> Right, and that's what I use for my root server. The SConscript I gave
>> is for the user program. Is there a more appropriate weaver for the user
>> program than WeaverIguanaProgram?
>
> Using the Iguana versions might be able to serve as examples.
> Depending on which version you pick, however, the system will
> link the libraries differently. Using the Iguana version may
> link with Iguana-sepcific initialization, see libs/c/src/sys-*.
> Hence, it may be more useful to have a specific version for your OS?
I'm setting env.system for the non-root programs in my top-level project
SConstruct, so the right bits of libc are used.
> Also, how are you picking out the instruction pointer in the image.boot?
> One way to verify that the system has loaded the binary properly and
> is jumping to the correct starting address may be to put printf()
> statements just when it is about to start your program, and also
> break into the debugger with L4_KDB_Enter(). In the debugger, dump
> the memory at the virtual address for the starting instruction pointer,
> and do an objdump for that program and verify that the opcodes match up.
I think that the real issue is that I need all the userland stuff in the
bootimage to be linked 1:1, i.e. with the same physical and virtual
addresses, which is currently not the case. I've been fiddling with the
weaver addressing parameter trying to get that to happen, without
success so far. Any tips?
- Josh
More information about the Developer
mailing list