Skip to main content

IAR Embedded Workbench for Arm 9.70.x

The IAR ELF Object Tool—iobjmanip

In this section:

Use the IAR ELF Object Tool, iobjmanip, to perform low-level manipulation of ELF object files.

Invocation syntax

The invocation syntax for the IAR ELF Object Tool is:

iobjmanip options inputfile outputfile
Parameters

The parameters are:

Parameter

Description

options

Command line options that define actions to be performed. These options can be placed anywhere on the command line. At least one of the options must be specified.

inputfile

A relocatable ELF object file.

outputfile

A relocatable ELF object file with all the requested operations applied.

Table 118. iobjmanip parameters 


See also Rules for specifying a filename or directory as parameters.

Examples

This example renames the section .example in input.o to .example2 and stores the result in output.o:

iobjmanip ‑‑rename_section .example=.example2 input.o output.o

Summary of iobjmanip options

This table summarizes the iobjmanip options:

Command line option

Description

-f

Extends the command line.

‑‑f

Extends the command line, optionally with a dependency.

‑‑no_bom

Omits the Byte Order Mark from UTF-8 output files.

‑‑remove_file_path

Removes path information from the file symbol.

‑‑remove_section

Removes one or more section.

‑‑rename_section

Renames a section.

‑‑rename_symbol

Renames a symbol.

‑‑strip

Removes debug information.

‑‑text_out

Specifies the encoding for text output files.

‑‑update_typeless_globals

Updates the type of global symbols in an object file.

‑‑utf8_text_in

Uses the UTF-8 encoding for text input files.

‑‑version

Sends tool output to the console and then exits.

Table 119. iobjmanip options summary 


For more information, see Descriptions of utilities options.

Diagnostic messages

This page lists the messages produced by iobjmanip:

Lm001: No operation given

None of the command line parameters specified an operation to perform.

Lm002: Expected nr parameters but got nr

Too few or too many parameters. Check invocation syntax for iobjmanip and for the used command line options.

Lm003: Invalid section/symbol renaming pattern pattern

The pattern does not define a valid renaming operation.

Lm004: Could not open file filename

iobjmanip failed to open the input file.

Lm005: ELF format error msg

The input file is not a valid ELF object file.

Lm006: Unsupported section type nr

The object file contains a section that iobjmanip cannot handle. This section will be ignored when generating the output file.

Lm007: Unknown section type nr

iobjmanip encountered an unrecognized section. iobjmanip will try to copy the content as is.

Lm008: Symbol symbol has unsupported format

iobjmanip encountered a symbol that cannot be handled. iobjmanip will ignore this symbol when generating the output file.

Lm009: Group type nr not supported

iobjmanip only supports groups of type GRP_COMDAT. If any other group type is encountered, the result is undefined.

Lm010: Unsupported ELF feature in file: msg

The input file uses a feature that iobjmanip does not support.

Lm011: Unsupported ELF file type

The input file is not a relocatable object file.

Lm012: Ambiguous rename for section/symbol name (alt1 and alt2)

An ambiguity was detected while renaming a section or symbol. One of the alternatives will be used.

Lm013: Section name removed due to transitive dependency on name

A section was removed as it depends on an explicitly removed section.

Lm014: File has no section with index nr

A section index, used as a parameter to ‑‑remove_section or ‑‑rename_section, did not refer to a section in the input file.

Ms003: could not open file filename for writing

iobjmanip failed to open the output file for writing. Make sure that it is not write protected.

Ms004: problem writing to file filename

An error occurred while writing to file filename. A possible reason for this is that the volume is full.

Ms005: problem closing file filename

An error occurred while closing the file filename.