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