问题场景:简单地说,我们是否有一个Trace32命令从加载到目标的ELF文件中读取符号(及其内容)?我们有这样一种特殊情况,即ELF文件的应用特定调试符号作为ELF中“.noload”部分的一部分,这意味着符号/内容是ELF文件的一部分(使用readelf -a xxxx.elf_file_name读取时可用),但不是最终生成的二进制映像的一部分,即当生成闪现到目标内存的xxx.bin时,ELF文件中的“.noload”部分被剥离掉。
“.noload”部分中的调试符号是静态赋值的,这些值在运行时不会更改。
当我试图读取“.noload”部分的调试符号(编译为二进制并加载到trace3
当我在ELF文件上使用.note.ABI-tag时,我会看到一个objdump -h <binary>部分。
根据ELF手册页面:
.note.ABI-tag
This section is used to declare the expected run-time ABI
of the ELF image. It may include the operating system name
and its run-time versions. This section is of type
我使用objcopy提取/替换某些部分是windows系统上的ELF文件。
>objcopy.exe -V
GNU objcopy 2.17.50 20060824
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
这在一般情况下是可行的。
但我的精灵文件