What is the OPTION in the GCC's option "-Wl,OPTION"?
Asked Answered
S

4

16

When I read the GCC's info manual, I found the link option -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.

But I could not find the definition of the OPTION. Where can I find it?

Sean answered 11/8, 2009 at 8:8 Comment(0)
M
12

The linker is called ld. Googling for ld options gives e.g. http://sourceware.org/binutils/docs-2.16/ld/Options.html

Mcclanahan answered 11/8, 2009 at 8:11 Comment(1)
ho, I found: "if the linker is being invoked indirectly, via a compiler driver (e.g. gcc) then all the linker command line options should be prefixed by -Wl". Thanks.Sean
S
10

It is linker options written like this (from my makefile):

FLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc

The linker options are listed in detail on the linker man page: ld (the GNU linker)

Skimmer answered 11/8, 2009 at 8:13 Comment(0)
H
3

The options are for the ld linker, and are listed here.

Halothane answered 11/8, 2009 at 8:14 Comment(0)
P
2

On my linker (for sh4), you type sh4ld --help.

Paranymph answered 23/9, 2013 at 14:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.