[okl4-developer] linking boot image
Geoffrey Lee
glee at ok-labs.com
Mon Aug 18 21:04:37 EST 2008
On Mon, Aug 18, 2008 at 02:47:40PM +1000, Tomas Hruby wrote:
> 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.
Hi Tomas
The programs are laid out in memory by the build system. Hence
this address is picked by the build system. However, I don't
think this answers what are you are really after. Do you have
a specific problem that you are trying to solve?
>
> T.
>
-gl
> > 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
> >
> >
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
>
--
More information about the Developer
mailing list