Page 1 of 1
Help with linker
Posted: Mon Jul 21, 2014 7:33 pm
by deleted
Hello, I am new to this site, and have been developing an operating system. My problem: I can't use regular ld command with argument -T.
I have googled for a long time but with no results. Here is my specs:
* Developing on: Macbook, while 2010, Xcode 3.2, with i686-pc-elf toolchain installed.
Any help would be awesome. Thanks!!
-- wxwsk8er
Re: Help with linker
Posted: Mon Jul 21, 2014 9:15 pm
by zhiayang
You cannot use OS X's 'ld' tool to link.
Make a
GCC Cross Compiler, then use the LD from your i686-elf-pc-ld to link.
Re: Help with linker
Posted: Tue Jul 22, 2014 6:04 am
by deleted
requimrar wrote:You cannot use OS X's 'ld' tool to link.
Make a
GCC Cross Compiler, then use the LD from your i686-elf-pc-ld to link.
When do this:
Code: Select all
walt-pachs-macbook:~ Walt$ /usr/i686-pc-elf/bin/ld -T
/usr/i686-pc-elf/bin/ld: unrecognized option '-T'
/usr/i686-pc-elf/bin/ld: use the --help option for usage information
When I use it directly:
Code: Select all
walt-pachs-macbook:~ Walt$ i686-pc-elf-ld -T
i686-pc-elf-ld: unrecognized option '-T'
i686-pc-elf-ld: use the --help option for usage information
When I use ld.gold:
Code: Select all
walt-pachs-macbook:~ Walt$ /usr/i686-pc-elf/bin/ld.gold -T
/usr/i686-pc-elf/bin/ld.gold: -T: missing argument
/usr/i686-pc-elf/bin/ld.gold: use the --help option for usage information
So ld.gold works fine, but the rest do not. Unless I call gcc and ask for a linkage...
Thanks for the help
Re: Help with linker
Posted: Tue Jul 22, 2014 10:56 pm
by Combuster
I have a nagging suspicion that none of those cross-linkers were built according to the tutorial though.
Re: Help with linker
Posted: Tue Jul 22, 2014 11:49 pm
by jnc100
Even my cross compiler gives this error when run with the -T option and no linker script name specified:
Code: Select all
$ i586-elf-ld -T
i586-elf-ld: unrecognized option '-T'
i586-elf-ld: use the --help option for usage information
You also have to specify a linker script file.
Regards,
John.
Re: Help with linker
Posted: Wed Jul 23, 2014 8:47 am
by deleted
I downloaded the binarys, but I will try what you said. With the option and let you know how it works
thanks!!
Re: Help with linker
Posted: Wed Jul 23, 2014 3:49 pm
by deleted
It worked!!
Thanks for all your help!!