GCC选项中的选项是什么"-Wl,OPTION"

Yan*_*Xie 8 linker gcc

当我阅读GCC的信息手册时,我找到了链接选项-Wl,OPTION:

`-Wl,OPTION'
 Pass OPTION as an option to the linker.  If OPTION contains
 commas, it is split into multiple options at the commas.
Run Code Online (Sandbox Code Playgroud)

但我找不到OPTION的定义.谁能告诉我在哪里找到它?我有谷歌,但没有找到.

laa*_*lto 9

链接器被调用ld.谷歌搜索ld options提供例如http://sourceware.org/binutils/docs-2.16/ld/Options.html

  • ho,我发现:"如果通过编译器驱动程序(例如gcc)间接调用链接器,则所有链接器命令行选项都应以-Wl为前缀".谢谢. (4认同)

neu*_*uro 6

它是这样编写的链接器选项(来自我的makefile):

FLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc
Run Code Online (Sandbox Code Playgroud)

链接器选项在链接器手册页中详细列出:ld