-qweaksymbol

Category

Object code control

Pragma equivalent

None.

Purpose

Enables the generation of weak symbols.

When the -qweaksymbol option is in effect, the compiler generates weak symbols for the following:
  • Inline functions with external linkage
  • Identifiers specified as weak with #pragma weak or __attribute__((weak))

Syntax

Read syntax diagramSkip visual syntax diagram
        .-weaksymbol---.   
>>- -q--+-noweaksymbol-+---------------------------------------><

Defaults

-qweaksymbol

Usage

C++ only When compiling C++ programs that contain extern inline functions, you can use -qweaksymbol to suppress linker messages warning of duplicate symbols.

Predefined macros

None.

Related information