views:

209

answers:

1

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.

+2  A: 

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 ld man page to figure out how to do what you want with the native linker or install your own version of the GCC.

benzado