Grub

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Whatever5k

Grub

Post by Whatever5k »

What does the ld option -Ttext 0x100000 mean?
And how does this help grub to load the kernel?
J. Weeks

RE:Grub

Post 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
The Legend

RE:Grub

Post 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!
J. Weeks

RE:Grub

Post 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
Post Reply