B.2. AIX and Linux Linker Options Comparison Table
Table B-2 only lists the most commonly used linker options.
Table B-2. AIX and Linux Linker Switches Comparison Table
When creating a dynamically linked executable, adds all symbols to the dynamic symbol table.
Sets the maximum size of objects to be optimized using the GP register to size. This is only meaningful for object file formats such as MIPS ECOFF, which supports putting large and small objects into different sections. This is ignored for other object file formats.
-e entry --entry=entry
Uses entry as the explicit symbol for beginning execution of your program, rather than the default entry point.
-bdynamic or bshared
-Bdynamic -dy -call_shared or -Wl brt -shared
Links against dynamic libraries. The different variants of this option are for compatibility with various systems. You may use this option multiple times on the command line. It affects library searching for -l options that follow it.
-bM:SRE or brtl or G
Creates a shared library that is reentrant (runtime linkable).
Adds the archive file libarchive.a to the list of files to link. This option may be used any number of times. This option also searches for shared objects (.so ) for other platforms; however, when running on a Linux platform, only archives are searched.
Specifies a search path for library names.
Specifies the library search direction for the runtime linker.
Searches the specified directory for library files specified by the -l option.