Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ reloc(4) — 4D1 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

as(1)

ld(1)

a.out(4)

syms(4)

RELOC(4)



     RELOC(4)                                                 RELOC(4)



     NAME
          reloc - relocation information for a common object file

     SYNOPSIS
          #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 will be in the following format.

          struct   reloc
          {
                   long      r_vaddr ;   /* (virtual) address of reference */
                   long      r_symndx ;  /* index into symbol table */
                   ushort    r_type ;    /* relocation type */
          } ;

          #define  R_ABS     0
          #define  R_DIR32   06
          #define  R_DIR32S  012


          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_ABS             The reference is absolute and no
                            relocation is necessary.  The entry will
                            be ignored.

          R_DIR32           A direct 32-bit reference to the symbol's
                            virtual address.

          R_DIR32S          A direct 32-bit reference to the symbol's
                            virtual address, with the 32-bit value
                            stored in the reverse order in the object
                            file.

          More relocation types exist for other processors.
          Equivalent relocation types on different processors have
          equal values and meanings.  New relocation types will be
          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
          as(1), ld(1), a.out(4), syms(4).




     Page 1                                        (last mod. 8/20/87)





     RELOC(4)                                                 RELOC(4)



     ORIGIN
          AT&T V.3





















































     Page 2                                        (last mod. 8/20/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026