# Linking or Linker Options

This section contains descriptions for compiler options that pertain to linking or to the linker.

Parent topic: Compiler Options

- Bdynamic
  Enables dynamic linking of libraries at run time.
- Bstatic
  Enables static linking of a user's library.
- Bsymbolic
  Binds references to all global symbols in a program to the definitions within a user's shared library.
- Bsymbolic-functions
  Binds references to all global function symbols in a program to the definitions within a user's shared library.
- cxxlib
  Determines whether the compiler links using the C++ run-time libraries and header files provided by gcc.
- dynamic-linker
  Specifies a dynamic linker other than the default.
- dynamiclib
  Invokes the libtool command to generate dynamic libraries.
- F (Windows*)
  Specifies the stack reserve amount for the program.
- F (macOS)
  Adds a framework directory to the head of an include file search path.
- fixed
  Causes the linker to create a program that can be loaded only at its preferred base address.
- Fm
  Tells the linker to generate a link map file. This is a deprecated option that may be removed in a future release.
- fuse-ld
  Tells the compiler to use a different linker instead of the default linker (ld).
- l
  Tells the linker to search for a specified library when linking.
- L
  Tells the linker to search for libraries in a specified directory before searching the standard directories.
- LD
  Specifies that a program should be linked as a dynamic-link (DLL) library.
- link
  Passes user-specified options directly to the linker at compile time.
- MD
  Tells the linker to search for unresolved references in a multithreaded, dynamic-link run-time library.
- MT
  Tells the linker to search for unresolved references in a multithreaded, static run-time library.
- no-libgcc
  Prevents the linking of certain gcc-specific libraries.
- nodefaultlibs
  Prevents the compiler from using standard libraries when linking.
- no-intel-lib, Qno-intel-lib
  Disables linking to specified Intel® libraries, or to all Intel® libraries.
- nostartfiles
  Prevents the compiler from using standard startup files when linking.
- nostdlib
  Prevents the compiler from using standard libraries and startup files when linking.
- pie
  Determines whether the compiler generates position-independent code that will be linked into an executable.
- pthread
  Tells the compiler to use pthreads library for multithreading support.
- shared
  Tells the compiler to produce a dynamic shared object instead of an executable.
- shared-intel
  Causes Intel-provided libraries to be linked in dynamically.
- shared-libgcc
  Links the GNU libgcc library dynamically.
- static
  Prevents linking with shared libraries.
- static-intel
  Causes Intel-provided libraries to be linked in statically.
- static-libgcc
  Links the GNU libgcc library statically.
- static-libstdc++
  Links the GNU libstdc++ library statically.
- staticlib
  Invokes the libtool command to generate static libraries.
- T
  Tells the linker to read link commands from a file.
- u (Linux*)
  Tells the compiler the specified symbol is undefined.
- v
  Specifies that driver tool commands should be displayed and executed.
- Wa
  Passes options to the assembler for processing.
- Wl
  Passes options to the linker for processing.
- Wp
  Passes options to the preprocessor.
- Xlinker
  Passes a linker option directly to the linker.
- Zl
  Causes library names to be omitted from the object file.