Using a Linker Script on Mac OS X

筅森魡賤 提交于 2019-12-01 15:53:05

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/2051689/using-a-linker-script-on-mac-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!