The OpenD Programming Language

dysymtab_command.extreloff

Offset to external relocation entries-

To support relocating an individual module in a library file quickly the external relocation entries for each module in the library need to be accessed efficiently. Since the relocation entries can't be accessed through the section headers for a library file they are separated into groups of local and external entries further grouped by module. In this case the presents of this load command who's extreloff, nextrel, locreloff and nlocrel fields are non-zero indicates that the relocation entries of non-merged sections are not referenced through the section structures (and the reloff and nreloc fields in the section headers are set to zero).

Since the relocation entries are not accessed through the section headers this requires the r_address field to be something other than a section offset to identify the item to be relocated. In this case r_address is set to the offset from the vmaddr of the first LC_SEGMENT command. For MH_SPLIT_SEGS images r_address is set to the offset from thevmaddr of the first read-write LC_SEGMENT command.

The relocation entries are grouped by module and the module table entries have indexes and counts into them for the group of external relocation entries for that the module.

For sections that are merged across modules there must not be any remaining external relocation entries for them (for merged sections remaining relocation entries must be local).

struct dysymtab_command
uint extreloff;

Meta