Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which linker is used by gcc?

Tags:

gcc

linker

How to determine which linker is used by my gcc?
For example I have 3 linkers:
2 in one directory, same place as for gcc
and another one linker in another directory.

like image 484
Laser Avatar asked Sep 07 '12 12:09

Laser


People also ask

What is used for gcc?

GCC stands for GNU Compiler Collections which is used to compile mainly C and C++ language. It can also be used to compile Objective C and Objective C++.

What linker does clang use?

Clang can be configured to use one of several different linkers: GNU ld. GNU gold. LLVM's lld.

What is the linker in C++?

The linker is a program that makes executable files. The linker resolves linkage issues, such as the use of symbols or identifiers which are defined in one translation unit and are needed from other translation units. Symbols or identifiers which are needed outside a single translation unit have external linkage.

Is G ++ and gcc the same?

DIFFERENCE BETWEEN g++ & gccg++ is used to compile C++ program. gcc is used to compile C program.


1 Answers

You may add -Wl,-verbose to your gcc link command or use

gcc -print-prog-name=ld
like image 197
Stephane Rouberol Avatar answered Oct 27 '22 00:10

Stephane Rouberol