13.7. tiarmstrip - Object File Stripping Tool

The tiarmstrip tooll can be used to strip sections and symbols from object files.

13.7.1. Usage

tiarmstrip [options] inputs

  • tiarmstrip - is the command that invokes the object file stripping tool.

  • options - that affect the behavior of tiarmstrip. If no other stripping or remove options are specified on the command line, then tiarmstrip will assume the --strip-all option is enabled.

  • inputs - identify one or more object files that are processed by tiarmstrip. By default, the input files are modified in-place. If - is specified for the input file, the input is read from the program’s standard input stream. If the input is an archive, any requested operations will be applied to each archive member individually.

13.7.2. Options

--disable-deterministic-archives, -U

Use real values for UIDs, GIDs and timestamps when updating archive member headers.

--discard-all, -x

Remove most local symbols from the output. File and section symbols in ELF objects will not be discarded.

--enable-deterministic-archives, -D

Enable deterministic mode when stripping archives, i.e. use 0 for archive member header UIDs, GIDs and timestamp fields. This option is enabled by default.

--help, -h

Print a summary of command line options.

--no-strip-all

Disable the --strip-all option.

-o <file>

Write output to specified <file>. Multiple input files cannot be used in combination with the -o option.

--remove-section <section>, -R <section>

Remove the specified <section> from the output. This option can be specified multiple times to remove multiple sections simultaneously.

--strip-all, -S

For ELF objects, remove from the output all symbols and non-alloc sections not within segments, except for the .ARM.attribute section and the section name table.

--strip-debug, -g

Remove all debug sections from the output.

--strip-symbol <symbol>, -N <symbol>

Remove all symbols named <symbol> from the output. This option can be specified multiple times to remove multiple symbols.

--strip-unneeded

Remove from the output all local or undefined symbols that are not required by relocations. Also remove all debug sections.

--version, -V

Display the version of the tiarmstrip executable.

--wildcard, -w

Allow wildcard syntax (such as “*” and “?”) for symbol-related options. Wildcards are enabled by default for section-related options.

@<file>

Read command-line options and commands from specified <file>.

Allow tiarmstrip to remove sections even if it would leave invalid section references. Any invalid sh_link fields will be set to zero.

--discard-locals, -X

Remove local symbols starting with “.L” from the output.

--keep-file-symbols

Keep symbols of type STT_FILE, even if they would otherwise be stripped.

--keep-section <section>

When removing sections from the output, do not remove sections named <section>. This option can be specified multiple times to keep multiple sections.

--keep-symbol <symbol>, -K <symbol>

When removing symbols from the output, do not remove symbols named <symbol>. This option can be specified multiple times to keep multiple symbols.

--preserve-dates, -p

Preserve access and modification timestamps in the output.

--strip-sections

Remove from the output all section headers and all section data not within segments. Note that many tools will not be able to use an object without section headers.

13.7.3. Exit Status

tiarmstrip exits with a non-zero exit code if there is an error. Otherwise, it exits with code 0.