Is there any way to use a linker script with ld on Mac OS X?
The GNU ld program on Linux accepts a -T <scriptname> option, but on Mac OS -T is an unknown command option. Using an alternative installation of GCC is okay with me, if that solves the problem.
The Fink Project has a document on porting Unix software to Darwin / Mac OS X, it claims that the Darwin linker isn’t even based on the GNU linker.
I think you will have to read the
ldman page to figure out how to do what you want with the native linker or install your own version of the GCC.