en:docs:tk:formats:newexe

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:tk:formats:newexe [2024/09/26 01:54] prokusheven:docs:tk:formats:newexe [2024/10/13 14:35] (current) prokushev
Line 75: Line 75:
     } ns_union;     } ns_union;
 }; };
 +
 +Relocation table header
  
 ^ Offset ^ Size ^ Name ^ Description ^ ^ Offset ^ Size ^ Name ^ Description ^
-| 00h | WORD | nr_nreloc | ??? |+| 00h | WORD | nr_nreloc | Number of relocation table entries |
  
 +Relocation table entry
 +
 +^ Offset ^ Size ^ Name ^ Description ^
 +| 00h | char | nr_stype | Source type (0Fh = NRSTYP - source mask): 00h = LOBYTE, 02h = SEGMENT, 03h = FAR_ADDR (32-bit pointer), 05h = OFFSET (16-bit offset) |
 +| 01h | char | nr_flags | Flags byte (03h = TARGET_MASK): 00h = INTERNALREF, 01h = IMPORTORDINAL, 02h = IMPORTNAME, 03h = OSFIXUP, 04h = ADDITIVE |
 +| 02h | WORD | nr_soff | Offset within this segment of the source chain. If the ADDITIVE flag is set, then target value is added to the source contents, instead of replacing the source and following the chain. The source chain is an 0FFFFh terminated linked list within this segment of all references to the target |
 +| Internal fixup ||||
 +| 04h | char | nr_segno | Segment number (for fixed segment) or 0FFh (for movable segment) |
 +| 05h | char | nr_res | Reserved (usually zero) |
 +| 06h | WORD | nr_entry | Entry table number (for movable segment) offset segment |
 +| Import ||||
 +| 04h | WORD | nr_mod | ??? |
 +| 06h | WORD | nr_proc | ??? |
 +| OS Fixup ||||
 +| 04h | WORD | nr_ostype | ??? |
 +| 06h | WORD | nr_osres | ??? |
  
-struct new_rlc { 
-    char            nr_stype; 
-    char            nr_flags; 
-    WORD  nr_soff; 
-    union { 
-        struct { 
-            char            nr_segno; 
-            char            nr_res; 
-            WORD  nr_entry; 
-          } nr_intref; 
-        struct { 
-            WORD  nr_mod; 
-            WORD  nr_proc; 
-          } nr_import; 
-        struct { 
-            WORD  nr_ostype; 
-            WORD  nr_osres; 
-          } nr_osfix; 
-      } nr_union; 
-}; 
  
 ^ Offset ^ Size ^ Name ^ Description ^ ^ Offset ^ Size ^ Name ^ Description ^