ddpi_elf_set_csect_addrs operation

The ddpi_elf_set_csect_addrs operation assigns the high and low addresses to the CSECT of the ELF object.

Description

ddpi_elf_set_csect_addrs should be used for contiguous CUs only. These values help to determine the owning CU of a given address. That is, it is used to determine which CU to load, if there are multiple CUs.

An address of (Dwarf_Addr)-1 is considered a bad address. csect_low_addr points to the beginning of the object. csect_high_addr points to the last byte in the object. csect_low_addr and csect_high_addr are not guaranteed to enclose all control blocks. If they are set to a non -1 value, they are guaranteed to enclose all executable code for the given CU.

Prototype

int ddpi_elf_set_csect_addrs(
  Ddpi_Elf              d_elf, 
  Dwarf_Addr            low_addr,
  Dwarf_Addr            high_addr,
  Ddpi_Error*           error);

Parameters

d_elf
Input. This accepts a Ddpi_Elf object.
low_addr
Input. This accepts the lowest known address in CSECT (the first byte of the object). (Dwarf_Addr)-1 is not an acceptable value address.
high_addr
Input. This accepts the highest known address in CSECT (the last byte of the object). (Dwarf_Addr)-1 is not an acceptable value address.
Note: low_addr and high_addr are not guaranteed to enclose all control blocks. They are guaranteed to enclose all executable code for the given CU if they are set to a value that is not -1.
error
See The libddpi error parameter.

Return values

DW_DLV_OK
Returned upon successful assignment of the high and low addresses.
DW_DLV_NO_ENTRY
Never returned.
DW_DLV_ERROR
This value is returned if:
  • elf is NULL.
  • The Ddpi_Access or Ddpi_Info object associated with elf is NULL.