[okl4-developer] linking boot image

Tomas Hruby thruby at cs.otago.ac.nz
Mon Aug 18 14:47:40 EST 2008


Hi,

> If you look closely, the elfadorn command actually contains a call to  
> the linker (ld).  The -Ttext option is actually passed to the linker,  
> not elfadorn.  If you take a look at the linker man page, you'll find  
> that -Ttext determines the absolute address that the .text section will 
> be linked to.  This is important because the bootloader should start 
> execution from this very address after bootstrap.

Yes, that is clear. It was probably a wrong question. I mean, where
does this specific value comes from when linking the root server. I am
not specifying it anywhere.  I fured out that I can change it by
setting _LINKADDRESS in machine if I want to link usercode to a
different address.

		T.

> Of course, depending on your setup, it is possible to change this  
> address and still have a working system (for example, simply telling the 
> bootloader to start at a different address).
>
> Which platform are you working on, and what linker is being used?
>
> Nelson.
>
> On 18/08/2008, at 11:30 AM, Tomas Hruby wrote:
>
>> when linking, elfadorn gets called with -Ttext=100000 option. Where
>> does it come from? How can I change it (or not to use it)?
>
> --
> (nt)
>
> Nelson Tam
>
>



More information about the Developer mailing list