ld: unknown option: -T
Posted: Thu Mar 05, 2009 5:52 pm
Hello,
I am interested in creating my own operating systems to learn more about their inner workings and push myself to improve my programming skills, however the limited ld tool that came with my Mac is holding me back. The tutorial I am using instructs me to use the -T option for gnu linker scripts, however I get the error:
The page of the tutorial I am following is: http://osdever.net/bkerndev/Docs/basickernel.htm (at the bottom)
The error occurs in the following area of my script:
I have searched the internet and many forums yet have not found a solution. I am aware that ld is a part of binutils, a gnu package. I attempted to install binutils, however ld was not included in the output directory. If I am forced to, then I can use my linux virtual machine, however it is very difficult to transfer files between Mac OS X and Ubuntu, so I'd prefer to be able to develop natively on my Mac.
If anyone can help me with a workaround or a port of ld which includes the -T option, I'd very much appreciate it.
Thank you in advance for any replies
I am interested in creating my own operating systems to learn more about their inner workings and push myself to improve my programming skills, however the limited ld tool that came with my Mac is holding me back. The tutorial I am using instructs me to use the -T option for gnu linker scripts, however I get the error:
Code: Select all
ld: unknown option: -T
The error occurs in the following area of my script:
Code: Select all
echo Finished compiling! Now linking...
echo
#
# Error occurs on the line below due to the absence of the
# -T option in the ld binary included on my Mac
# which has OS X 10.5 Leopard installed, if you're
# wandering
#
ld -T link.ld -o ${bldd}/kernel.bin start.o
if [ $? -gt 0 ]; then echo "LD failed."; read -p "Press any key to exit..."; exit 1; fi
echo Finished linking!
echo creating Kernel Image...
touch $kimg
If anyone can help me with a workaround or a port of ld which includes the -T option, I'd very much appreciate it.
Thank you in advance for any replies