Section B.2. AIX and Linux Linker Options Comparison Table

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

Uses entry as the explicit symbol for beginning execution of your program, rather than the default entry point.

-bdynamic or bshared



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.


-rpath path

Specifies the library search direction for the runtime linker.



Searches the specified directory for library files specified by the -l option.

UNIX to Linux Porting. A Comprehensive Reference
UNIX to Linux Porting: A Comprehensive Reference
ISBN: 0131871099
EAN: 2147483647
Year: 2004
Pages: 175 © 2008-2017.
If you may any questions please contact us: