-b

Description

Controls how shared objects are processed by the editor.

Syntax

Read syntax diagramSkip visual syntax diagram        .-dynamic-.
>>- -b--+-shared--+--------------------------------------------><
        '-static--'

where options are:

dynamic, shared Causes the linkage editor to process subsequent shared objects in dynamic mode. This is the default. In dynamic mode, shared objects are not statically included in the output file. Instead, the shared objects are listed in the loader section of the output file.
static Causes the linkage editor to process subsequent shared objects in static mode. In static mode, shared objects are statically linked in the output file.

Notes

The default option, -bdynamic, ensures that the C library (lib.c) links dynamically. To avoid possible problems with unresolved linker errors when linking the C library, you must add the -bdynamic option to the end of any compilation sections that use the -bstatic option.

Related information