PEmicro - P&E Microcomputer Systems: Over 30 years as an Industry leader in Embedded Systems Development Tools, debug probes, and production programmers
Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service




In a previous post, we showed how to use PKGPPCNEXUS and  PKGCFZ_PRO to display the contents of an ELF/DWARF file using Readelf.  In this post, we look at the Readelf output and explain its description of your object code. 

We will use this example Readelf output to illustrate the kinds of information that Readelf provides.

The first item of interest is labeled "Entry point address". This is the address of the first instruction executed after reset. Your compiler or linker determines this value. The PEmicro debugger optionally uses the entry point address to execute your target application.

The "Section Headers" portion lists all of your linker sections that made it to your ELF/DWARF file. The ".debug_info" section is where ICD looks for the debugging information entries. Note that not all of these sections contribute to the application memory map.

The portions titled "Program Headers" and "Section to Segment mapping" describe the application memory map. ICD and PROG use the program headers to determine where to place object code on your target. Check that a linker section is included in the final memory map by examining the section to segment mapping. Note that the first entry in the program headers corresponds to the first entry in the section to segment mapping.

From the program headers, you can gather the following information about the memory map:
Type - Only LOAD types contribute to the final memory image
VirtAddr - load time location of code
MemSiz - number of bytes that the code segment occupies in the final memory image

PEmicro's PROG and ICD software support an uncommon feature of the GNU compiler.  GCC uses both the program header VirtAddr and PhysAddr fields, the former for run time address and the latter for load time address.  For more information on this useful feature, please refer to this document.





search in blog posts

Tags

Product pages
Cyclone (20)
Cyclone FX (22)
Multilink (11)
Multilink FX (7)
GDB Server (9)
Prog ACMP (3)
Interface Library Routines (3)


Manufacturer
ARM (19)
NXP (30)
Atmel (2)
Cypress (1)
Maxim (1)
Nordic Semiconductor (1)
Silicon Labs (1)
Toshiba (1)
Renesas (5)


Categories
Production Programming (35)
Debug (14)
Automated Control (6)
Miscellaneous (32)



© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement