Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gcc and ld arguments

how can I pass the option --enable-auto-import to ld from gcc?

like image 673
yassin Avatar asked May 28 '10 09:05

yassin


People also ask

Is GCC A compiler and linker?

The GNU Compiler Collection (gcc)The GNU Compiler Collection, gcc, can compile programs written in C, C++, Java and several other languages. It provides many useful command line options and syntax extensions, and also serves as a powerful frontend for the GNU linker, ld.

What does LD command do?

The ld command, also called the linkage editor or binder, combines object files, archives, and import files into one output object file, resolving external references. It produces an executable object file that can be run.

What does Ld do in GCC?

The ld command processes import files specified by the -bI (uppercase letter i) flag in the order specified after processing all other object files and libraries. You can specify an import file as an input file without the -bI flag if it is necessary to process the file before processing some object files.


2 Answers

gcc ... -Wl,--enable-auto-import ...
like image 91
Ignacio Vazquez-Abrams Avatar answered Oct 03 '22 12:10

Ignacio Vazquez-Abrams


  -Xlinker option
       Pass option as an option to the linker.  You can use this to supply system-specific
       linker options which GCC does not know how to recognize.
like image 40
zed_0xff Avatar answered Oct 03 '22 11:10

zed_0xff