Hello,
Where to start learning linkers and how to write a linking script?
Thanks.
Linkers
Re:Linkers
If you're using a GNU toolchain:
Or go to www.gnu.org and search for binutils.
If not, please tell us which linker you are using...
Code: Select all
info ld
If not, please tell us which linker you are using...
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Linkers
or check the FAQ. You might have a good bootstrap
<edit> just added HowLinkersWork to the FAQ, just in case you're missing an introduction to the subject.
For the rest, the "linker scripts" section of "info ld" should do the trick, really ...
<edit> just added HowLinkersWork to the FAQ, just in case you're missing an introduction to the subject.
For the rest, the "linker scripts" section of "info ld" should do the trick, really ...
Re:Linkers
Thanks for your reply with usefull info.
Can I use:
to produce my excutable kernel with out writting a linkscript?
Pype.Clicker, its grub bootloader
Can I use:
Code: Select all
$ nasm -f elf kernel.asm
$ ld -s -o kernel kernel.o
Pype.Clicker, its grub bootloader
Re:Linkers
Why not try it and see what happens? Don't be afraid of playing around as long as you are testing using an emulator or dedicated machine (be careful if testing on a machine which has valuable data).
There are 2 options you do want though: "-nostdlib" and "-e (entry function)". Check the docs, think, and you should understand why.
There are 2 options you do want though: "-nostdlib" and "-e (entry function)". Check the docs, think, and you should understand why.