You copied the Doc URL to your clipboard.

--as_needed, --no_as_needed

Controls whether or not a reference to a shared library is added to the DT_NEEDED tags.


The effect of this option depends on the position on the armlink command-line, and applies only to subsequent dynamic shared objects:

  • --as_needed adds references to the DT_NEEDED tags only if the subsequent shared objects are used for resolving symbols.

  • --no_as_needed unconditionally adds references to the DT_NEEDED tags.


The default is --as_needed.

However, if you specify --arm_linux, the default is --no_as_needed.

Example 12-1 Examples

The following example unconditionally adds a reference to in the DT_NEEDED tags, but only adds tags for and if they are used for resolving symbols:

armlink … --no-as-needed --as-needed