|
|
1.1 ! root 1: /* ! 2: * static char ID[] = "@(#) reloc.h: 1.4 6/6/83"; ! 3: */ ! 4: ! 5: struct reloc { ! 6: long r_vaddr; /* (virtual) address of reference */ ! 7: long r_symndx; /* index into symbol table */ ! 8: unsigned short r_type; /* relocation type */ ! 9: }; ! 10: ! 11: ! 12: /* ! 13: * relocation types for all products and generics ! 14: */ ! 15: ! 16: /* ! 17: * All generics ! 18: * reloc. already performed to symbol in the same section ! 19: */ ! 20: #define R_ABS 0 ! 21: ! 22: /* ! 23: * X86 generic ! 24: * 8-bit offset reference in 8-bits ! 25: * 8-bit offset reference in 16-bits ! 26: * 12-bit segment reference ! 27: * auxiliary relocation entry ! 28: */ ! 29: #define R_OFF8 07 ! 30: #define R_OFF16 010 ! 31: #define R_SEG12 011 ! 32: #define R_AUX 013 ! 33: ! 34: /* ! 35: * B16 and X86 generics ! 36: * 16-bit direct reference ! 37: * 16-bit "relative" reference ! 38: * 16-bit "indirect" (TV) reference ! 39: */ ! 40: #define R_DIR16 01 ! 41: #define R_REL16 02 ! 42: #define R_IND16 03 ! 43: ! 44: /* ! 45: * 3B generic ! 46: * 24-bit direct reference ! 47: * 24-bit "relative" reference ! 48: * 16-bit optimized "indirect" TV reference ! 49: * 24-bit "indirect" TV reference ! 50: * 32-bit "indirect" TV reference ! 51: */ ! 52: #define R_DIR24 04 ! 53: #define R_REL24 05 ! 54: #define R_OPT16 014 ! 55: #define R_IND24 015 ! 56: #define R_IND32 016 ! 57: ! 58: /* ! 59: * XL generics ! 60: * 10-bit direct reference ! 61: * 10-bit "relative" reference ! 62: * 32-bit "relative" reference ! 63: */ ! 64: #define R_DIR10 025 ! 65: #define R_REL10 026 ! 66: #define R_REL32 027 ! 67: ! 68: /* ! 69: * 3B and M32 generics ! 70: * 32-bit direct reference ! 71: */ ! 72: #define R_DIR32 06 ! 73: ! 74: /* ! 75: * M32 generic ! 76: * 32-bit direct reference with bytes swapped ! 77: */ ! 78: #define R_DIR32S 012 ! 79: ! 80: /* ! 81: * DEC Processors VAX 11/780 and VAX 11/750 ! 82: * ! 83: */ ! 84: ! 85: #define R_RELBYTE 017 ! 86: #define R_RELWORD 020 ! 87: #define R_RELLONG 021 ! 88: #define R_PCRBYTE 022 ! 89: #define R_PCRWORD 023 ! 90: #define R_PCRLONG 024 ! 91: ! 92: /* ! 93: * Motorolla 68000 ! 94: */ ! 95: ! 96: /* uses R_RELBYTE, R_RELWORD, R_RELLONG, R_PCRBYTE and R_PCRWORD as for ! 97: * DEC machines above ! 98: */ ! 99: ! 100: #define RELOC struct reloc ! 101: #define RELSZ 10 /* sizeof(RELOC) */ ! 102: ! 103: /* Definition of a "TV" relocation type */ ! 104: ! 105: #if N3B || U3B ! 106: #define ISTVRELOC(x) ((x==R_OPT16)||(x==R_IND24)||(x==R_IND32)) ! 107: #endif ! 108: #if B16 || X86 ! 109: #define ISTVRELOC(x) (x==R_IND16) ! 110: #endif ! 111: #if M32 ! 112: #define ISTVRELOC(x) (x!=x) /* never the case */ ! 113: #endif ! 114: #if MC68 ! 115: #define ISTVRELOC(x) ((x == R_IND16) || (x == R_IND32)) ! 116: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.