You copied the Doc URL to your clipboard.

--locals, --no_locals

Adds local symbols or removes local symbols depending on whether an image or partial object is being output.


The --locals option adds local symbols in the output symbol table.

The effect of the --no_locals option is different for images and object files.

When producing an executable image --no_locals removes local symbols from the output symbol table.

For object files built with the --partial option, the --no_locals option:

  • Keeps mapping symbols and build attributes in the symbol table.

  • Removes those local symbols that can be removed without loss of functionality.

    Symbols that cannot be removed, such as the targets for relocations, are kept. For these symbols, the names are removed. These are marked as [Anonymous Symbol] in the fromelf --text output.

--no_locals is a useful optimization if you want to reduce the size of the output symbol table in the final image.


The default is --locals.