|
|
#include <reloc.h>
struct reloc { long r_vaddr ; /* (virtual) address of reference */ long r_symndx ; /* index into symbol table */ unsigned short r_type ; /* relocation type */ } ;As the link editor reads each input section and performs relocation, the relocation entries are read. They direct how references found within the input section are treated.# define R_PCRLONG 024
More relocation types exist for other processors. Equivalent relocation types on different processors have equal values and meanings. New relocation types are defined (with new values) as they are needed.
Relocation entries are generated automatically by the assembler and automatically used by the link editor. Link editor options exist for both preserving and removing the relocation entries from object files.