Browse Source

+ initialize size and relflags in TRelRelocation

git-svn-id: trunk@45262 -
nickysn 5 years ago
parent
commit
03acadaf1e
1 changed files with 21 additions and 0 deletions
  1. 21 0
      compiler/ogrel.pas

+ 21 - 0
compiler/ogrel.pas

@@ -58,6 +58,9 @@ interface
       TRelRelocation = class(TObjRelocation)
       public
         RelFlags: TRelRelocationFlags;
+
+        constructor CreateSymbol(ADataOffset:TObjSectionOfs;s:TObjSymbol;Atyp:TObjRelocationType);
+        constructor CreateSection(ADataOffset:TObjSectionOfs;aobjsec:TObjSection;Atyp:TObjRelocationType);
       end;
 
       { TRelObjData }
@@ -104,6 +107,24 @@ implementation
           delete(result,1,1);
       end;
 
+{*****************************************************************************
+                              TRelRelocation
+*****************************************************************************}
+
+    constructor TRelRelocation.CreateSymbol(ADataOffset: TObjSectionOfs; s: TObjSymbol; Atyp: TObjRelocationType);
+      begin
+        inherited;
+        size:=2;
+        RelFlags:=[rrfSymbol];
+      end;
+
+    constructor TRelRelocation.CreateSection(ADataOffset: TObjSectionOfs; aobjsec: TObjSection; Atyp: TObjRelocationType);
+      begin
+        inherited;
+        size:=2;
+        RelFlags:=[];
+      end;
+
 {*****************************************************************************
                                 TRelObjData
 *****************************************************************************}