fromelf语法

 

--text

ARM Compiler toolchain v5.02 for µVision Using the fromelf Image Converter 
Home > fromelf command reference > --text

--text

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

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.

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 the data addresses.

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

The disassembly cannot be input to the assembler.

-d

Prints contents of the data sections.

-e

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

-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.

Example

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 inputfile.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 inputfile.axf but none of the structure addresses, enter:

    fromelf --text -a --select=*,~*.* --output=structaddress.txt infile.axf
    

 

生产bin文件:

fromelf.exe --bin -o  ../download/usb_core.bin ./RUN_IN_DDRAM/usb_core.axf

 

生成asm文件:

fromelf.exe --text -c -o "$L@L.asm" "#L"

 

$L、@L、L用来指定对应的路径或名称。

比如:生成D:\1\out\aa.axf文件,那么

L的内容为:D:\1\out\aa.axf

$L的内容为:D:\1\out\       (包含最后的“\”)

@L的内容为:aa

因此可以利用他们组成:

1、fromelf --bin -o "$L@L.bin" "$L@L.axf"     表示在axf相同的文件下生成bin文件。

2、fromelf --bin ".\obj\@L.axf" --output ".\obj\aa.bin"

 

 

 

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值