Page 1 of 1

Grub

Posted: Thu Feb 14, 2002 12:00 am
by Whatever5k
What does the ld option -Ttext 0x100000 mean?
And how does this help grub to load the kernel?

RE:Grub

Posted: Fri Feb 15, 2002 12:00 am
by J. Weeks
>On 2002-02-14 10:01:23, Whatever5k wrote:
>What does the ld option -Ttext 0x100000 mean?

I will create all code and data with an effective
offset of +1MB. In other words, the code wont
work, unless you load it at an offset of 1MB withen
the current segment.

>And how does this help grub to load the kernel?

It doesn't. There's no way grub can tell what
you specified on the command line to compile
your kernel.

If grub loads all kernels at +1MB, then this would
be the only way to make a kernel loadable by
grub, however, I doubt grub is that inflexible.

Jeff

RE:Grub

Posted: Sat Feb 16, 2002 12:00 am
by The Legend
>On 2002-02-15 18:06:43, J. Weeks wrote:
>>On 2002-02-14 10:01:23, Whatever5k wrote:
>>What does the ld option -Ttext 0x100000 mean?
>
>I will create all code and data with an effective
>offset of +1MB. In other words, the code wont
>work, unless you load it at an offset of 1MB withen
>the current segment.
>
>>And how does this help grub to load the kernel?
>
>It doesn't. There's no way grub can tell what
>you specified on the command line to compile
>your kernel.
>
>If grub loads all kernels at +1MB, then this would
>be the only way to make a kernel loadable by
>grub, however, I doubt grub is that inflexible.
>
>Jeff
For a kernel loadable by grub (unless you use a
chainloader), you have to add into your exe the offset
for the kernel as specified in the multiboot standard!

RE:Grub

Posted: Sun Feb 17, 2002 12:00 am
by J. Weeks
>For a kernel loadable by grub (unless you use a
>chainloader), you have to add into your exe the offset
>for the kernel as specified in the multiboot standard!

Indeed... which is a field in the executable itself...
still has nothing to do with the -tText on the
gcc command line.

Jeff