Keil Logo

Technical Support

On-Line Manuals

Compiler Reference Guide

Preface Arm Compiler Tools Overview armclang Reference armlink Reference fromelf Reference fromelf Command-line Options --base [[object_file::]load_region_ID=]num --bin --bincombined --bincombined_base=address --bincombined_padding=size,num --cad --cadcombined --compare=option[,option,…] --continue_on_error --coprocN=value (fromelf) --cpu=list (fromelf) --cpu=name (fromelf) --datasymbols --debugonly --decode_build_attributes --diag_error=tag[,tag,…] (fromelf) --diag_remark=tag[,tag,…] (fromelf) --diag_style={arm|ide|gnu} (fromelf) --diag_suppress=tag[,tag,…] (fromelf) --diag_warning=tag[,tag,…] (fromelf) --disassemble --dump_build_attributes --elf --emit=option[,option,…] --expandarrays --extract_build_attributes --fieldoffsets --fpu=list (fromelf) --fpu=name (fromelf) --globalize=option[,option,…] --help (fromelf) --hide=option[,option,…] --hide_and_localize=option[,option,…] --i32 --i32combined --ignore_section=option[,option,…] --ignore_symbol=option[,option,…] --in_place --info=topic[,topic,…] (fromelf) input_file (fromelf) --interleave=option --linkview, --no_linkview --localize=option[,option,…] --m32 --m32combined --only=section_name --output=destination --privacy (fromelf) --qualify --relax_section=option[,option,…] --relax_symbol=option[,option,…] --rename=option[,option,…] --select=select_options --show=option[,option,…] --show_and_globalize=option[,option,…] --show_cmdline (fromelf) --source_directory=path --strip=option[,option,…] --symbolversions, --no_symbolversions --text --version_number (fromelf) --vhx --via=file (fromelf) --vsn (fromelf) -w --wide64bit --widthxbanks armar Reference armasm Legacy Assembler Reference Appendixes

--text

D1.60 --text

Prints image information in text format. You can decode an ELF image or ELF object file using this option.

Syntax

--text [options]

Where options specifies what is displayed, and can be one or more of the following:

-a

Prints the global and static data addresses (including addresses for structure and union contents).

This option can only be used on files containing debug information. If no debug information is present, a warning is displayed.

Use the --select option to output a subset of fields in a data structure.

If you want to view the data addresses of arrays, expanded both inside and outside structures, use the --expandarrays option with this text category.

-c

This option disassembles code, alongside a dump of the original binary data being disassembled and the addresses of the instructions.

Note:

Disassembly is generated in armasm assembler syntax and not GNU assembler syntax.

Unlike --disassemble, the disassembly cannot be used as input to armasm.

Note:

To disassemble M-profile Vector Extension (MVE) instructions, you must specify the --cpu option for Arm®v8.1-M and later architectures. For example, --cpu=8.1-M.Main.mve.

To disassemble Scalable Vector Extension (SVE) instructions, you must not specify the --cpu option. fromelf cannot disassemble Armv8.4-A and later instructions without also disassembling Scalable Vector Extension SVE instructions.

armasm does not support:

  • Armv8.4-A and later architectures.
  • Certain backported options in Armv8.2-A and Armv8.3-A.
  • Assembling MVE or SVE instructions.
-d
Prints contents of the data sections.
-e

Decodes exception table information for objects. Use with -c when disassembling images.

Note:

Not supported for AArch64 state.
-g
Prints debug information.
-r
Prints relocation information.
-s
Prints the symbol and versioning tables.
-t
Prints the string tables.
-v
Prints detailed information on each segment and section header of the image.
-w
Eliminates line wrapping.
-y
Prints dynamic segment contents.
-z
Prints the code and data sizes.

These options are only recognized in text mode.

Usage

If you do not specify a code output format, --text is assumed. That is, you can specify one or more options without having to specify --text. For example, fromelf -a is the same as fromelf --text -a.

If you specify a code output format, such as --bin, then any --text options are ignored.

If destination is not specified with the --output option, or --output is not specified, the information is displayed on stdout.

Use the --only option to filter the list of sections.

Examples

The following examples show how to use --text:

  • To produce a plain text output file that contains the disassembled version of an ELF image and the symbol table, enter:

    fromelf --text -c -s --output=outfile.lst infile.axf
  • To list to stdout all the global and static data variables and all the structure field addresses, enter:

    fromelf -a --select=* infile.axf
  • To produce a text file containing all of the structure addresses in infile.axf but none of the global or static data variable information, enter:

    fromelf --text -a --select=*.* --output=structaddress.txt infile.axf
  • To produce a text file containing addresses of the nested structures only, enter:

    fromelf --text -a --select=*.*.* --output=structaddress.txt infile.axf
  • To produce a text file containing all of the global or static data variable information in infile.axf but none of the structure addresses, enter:

    fromelf --text -a --select=*,~*.* --output=structaddress.txt infile.axf
  • To output only the .symtab section information in infile.axf, enter:

    fromelf --only .symtab -s --output=symtab.txt infile.axf
Non-ConfidentialPDF file icon PDF version101754_0614_00_en
Copyright © 2019, 2020 Arm Limited or its affiliates. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.