DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

reloc(FP)


reloc -- relocation information for a common object file

Format

#include <reloc.h>

Description

Object files have one relocation entry for each relocatable reference in the text or data. If relocation information is present, it is in the following format.
   struct  reloc
   {
           long             r_vaddr ;       /* (virtual) address of reference */
           long             r_symndx ;      /* index into symbol table */
           unsigned short   r_type ;        /* relocation type */
   } ;
   

# define R_PCRLONG 024

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.


R_PCRLONG
A ``PC-relative'' 32-bit reference to the symbol's virtual address.

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.

See also

a.out(FP), as(CP), ld(CP), ldfcn(FP), syms(FP)

Standards conformance

reloc(FP) is not part of any currently supported standard; it was developed by UNIX System Laboratories, Inc. and is used by permission.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003