ELF File Dump Utility
[...]
dosetup3 ls3
bt l1
doen3 #5
bt 12 l1:
doen3 #7 l2:
loopstart3
[...]
loopend3
[...]
NOTE
The disassembler does not know which doen corresponds to loopstart3
, so ends up with an unmatched doen
instruction and prompts fatal error message. Disassembly is still possible if you omit the
f
command-line option.
14.3 ELF File Dump Utility
Use the Executable and Linking Format (ELF) file Dump Utility to output the headers of absolute and linkable object files in a human-readable format.
The information produced by the utility depends on the selected ELF object file type:
• Absolute (executable) -- Default output is ELF header, all program headers, and all sections headers.
• Linkable (relocatable) -- Default output is ELF header and all section headers.
To invoke the ELF dump utility from the command-line prompt, type: sc100-elfdump [option ...] <elf-file>
NOTE
The ELF dump utility is in this directory:
Parameters
<CWinstallDir>\SC\StarCore_Support\compiler\bin
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
344 Freescale Semiconductor, Inc.
Chapter 14 StarCore DSP Utilities
option
Table 14-3 defines the purpose and effect of each command-line option. Without options,
the utility returns the contents of the ELF Ehdr, Phdr, and Shdr structures and the symbol table. If you specify command-line options, the utility returns only the information that you specify on the command line.
NOTE
sc100-elfdump utility command-line options are case-sensitive.
elf-file
-n
-o
-P
-q one or more filenames, including optional pathnames. The input file should be either
Absolute- or Relocatable ELF object file.
-i
-L
-N
-A
-a
-b
-D
-d
-E
-e file
-g
-h
-I
-R file
-r
-S
Table 14-3. ELF File Dump Utility-Command-Line Options
Option Description
Writes the contents of all program segments
Writes the contents of all sections
Writes the contents of all SHT_PROGBITS sections
Writes the contents of all PT_DYNAMIC segments, does not apply to the SC3900fp DSP core
Writes the contents of all SHT_DYNAMIC sections, does not apply to the SC3900fp DSP core
Writes ELF header information
Writes error messages to the specified file instead of stderr
Writes the contents of all debug sections in hex format
Writes the contents of all SHT_HASH sections, does not apply to the SC3900fp DSP core
Writes the contents of all PT_INTERP segments, does not apply to the SC3900fp DSP core
Interprets the section contents
Writes the contents of all PT_LOAD segments
Writes the contents of all PT_NOTE segments, does not apply to the SC3900fp DSP core
Writes the contents of all SHT_NOTE sections
Writes the contents of overlay table sections
Writes the contents of all PT_PHDR segments
Specifies quiet mode, limits header information to the specified sections and segments
Writes the output to the specified file, instead of to the standard output
Writes the contents of all SHT_REL and SHT_RELA sections
Writes the contents of all PT_SHLIB segments, does not apply to the SC3900fp DSP core
Table continues on the next page...
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
Freescale Semiconductor, Inc.
345
-V
-X
-x
-y
-z
ELF File Dump Utility
Table 14-3. ELF File Dump Utility-Command-Line Options (continued)
-s
-t
-U
-u
Option Description
Writes the contents of all SHT_SHLIB sections, does not apply to the SC3900fp DSP core
Writes the contents of all SHT_STRTAB sections
Writes the contents of all unknown-type segments as hex dumps
Writes the contents of all unknown-type sections as hex dumps
Displays the version of the ELF file dump utility
Dumps all program-segment contents as hex
Dumps contents of all sections as hex
Writes the contents of all SHT_SYMTAB sections
Writes the contents of all SHT_DYNSYM sections, does not apply to the SC3900fp DSP core
The following listing shows the output of the ELF file dump utility.
NOTE
The file name is hello.eld
.
The ELF header extends from line e_ident
through line e_shstrndx
.
The program headers comprise lines
Segment 0
,
Segment 1
and their subordinate lines.
The section headers comprise the remaining lines.
Listing: ELF File Dump Utility-Output
hello.eld:
e_ident : 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
(ELF 64-bit LSB Version 1
e_type : 2 (Executable file)
e_machine : 58 (StarCore 100)
e_version : 1
e_entry : 0x4000c778
e_phoff : 0
e_shoff : 0x40
e_flags : 0x200 (SC3900fp (unknown revision))
e_ehsize : 64
e_phentsize : 56
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
346 Freescale Semiconductor, Inc.
Chapter 14 StarCore DSP Utilities
e_phnum : 6
e_shentsize : 64
e_shnum : 24
e_shstrndx : 23
Segment 0:
p_type : PT_LOAD
p_offset : 0x190
p_vaddr : 0x40000000
p_paddr : 0x40000000
p_filesz : 12
p_memsz : 12
p_flags : 0x6 PF_R PF_W
p_align : 4
Segment 1:
p_type : PT_LOAD
p_offset : 0x1a0
p_vaddr : 0x40001000
p_paddr : 0x40001000
p_filesz : 200
p_memsz : 200
p_flags : 0x4 PF_R
p_align : 8
Section 0:
sh_name :
sh_type : SHT_NULL
sh_flags : 0
sh_addr : 0
sh_offset : 0
sh_size : 0
sh_link : 0
sh_info : 0
sh_addralign : 0
sh_entsize : 0
Section 1:
sh_name : ddr_shared_data_nc_wt
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
Freescale Semiconductor, Inc.
347