Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

gcc

linker

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?

like image 454
Yantao Xie Avatar asked Aug 11 '09 08:08

Yantao Xie


People also ask

What is WL option?

Specifies linker command-line options to pass to the linker when a link step is being performed after compilation. See the armlink Command-line Options for information about available linker options.

What does WL Rpath do?

In computing, rpath designates the run-time search path hard-coded in an executable file or library. Dynamic linking loaders use the rpath to find required libraries. Specifically, it encodes a path to shared libraries into the header of an executable (or another shared library).

What is Link option?

The CRT lib directory includes several small object files that enable specific CRT features without any code change. These object files are called "link options" since you only have to add them to the linker command line to use them.

What is Xlinker in GCC?

-Xlinker option. Pass option as an option to the linker. You can use this to supply system-specific linker options that GCC does not recognize. If you want to pass an option that takes a separate argument, you must use -Xlinker twice, once for the option and once for the argument.


1 Answers

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)

like image 192
neuro Avatar answered Oct 30 '22 21:10

neuro