PEmicro logo
Cart New Account Login

Logo image
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 (130)
Cyclone FX (136)
Multilink (85)
Multilink FX (78)
GDB Server (41)
Prog ACMP (47)
Interface Library Routines (7)


Manufacturer
ARM (114)
NXP (102)
Microchip (7)
Cypress (7)
Infineon (10)
Maxim (3)
Nordic Semiconductor (3)
Silergy Teridian (1)
Silicon Labs (6)
STMicroelectronics (14)
Texas Instruments (3)
Toshiba (3)
Renesas (17)


Categories
Production Programming (134)
Debug (81)
Automated Control (38)
Miscellaneous (41)



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