Răsfoiți Sursa

* get rid of TOmfRelocation.GetGroupIndex; instead, read the index property of
the group object. This adds support for groups, other than DGROUP, when
writing omf relocations.

git-svn-id: trunk@39276 -

nickysn 7 ani în urmă
părinte
comite
f07658d3dc
1 a modificat fișierele cu 3 adăugiri și 12 ștergeri
  1. 3 12
      compiler/ogomf.pas

+ 3 - 12
compiler/ogomf.pas

@@ -55,7 +55,6 @@ interface
       private
       private
         FFrameGroup: string;
         FFrameGroup: string;
         FOmfFixup: TOmfSubRecord_FIXUP;
         FOmfFixup: TOmfSubRecord_FIXUP;
-        function GetGroupIndex(const groupname: string): Integer;
       public
       public
         destructor Destroy; override;
         destructor Destroy; override;
 
 
@@ -396,14 +395,6 @@ implementation
                                 TOmfRelocation
                                 TOmfRelocation
 ****************************************************************************}
 ****************************************************************************}
 
 
-    function TOmfRelocation.GetGroupIndex(const groupname: string): Integer;
-      begin
-        if groupname='DGROUP' then
-          Result:=1
-        else
-          internalerror(2014040703);
-      end;
-
     destructor TOmfRelocation.Destroy;
     destructor TOmfRelocation.Destroy;
       begin
       begin
         FOmfFixup.Free;
         FOmfFixup.Free;
@@ -440,7 +431,7 @@ implementation
                 if TOmfObjSection(ObjSection).PrimaryGroup<>nil then
                 if TOmfObjSection(ObjSection).PrimaryGroup<>nil then
                   begin
                   begin
                     FOmfFixup.FrameMethod:=ffmGroupIndex;
                     FOmfFixup.FrameMethod:=ffmGroupIndex;
-                    FOmfFixup.FrameDatum:=GetGroupIndex(TOmfObjSection(ObjSection).PrimaryGroup.Name);
+                    FOmfFixup.FrameDatum:=TOmfObjSection(ObjSection).PrimaryGroup.index;
                   end
                   end
                 else
                 else
                   FOmfFixup.FrameMethod:=ffmTarget;
                   FOmfFixup.FrameMethod:=ffmTarget;
@@ -451,7 +442,7 @@ implementation
                 if TOmfObjSection(ObjSection).PrimaryGroup<>nil then
                 if TOmfObjSection(ObjSection).PrimaryGroup<>nil then
                   begin
                   begin
                     FOmfFixup.TargetMethod:=ftmGroupIndexNoDisp;
                     FOmfFixup.TargetMethod:=ftmGroupIndexNoDisp;
-                    FOmfFixup.TargetDatum:=GetGroupIndex(TOmfObjSection(ObjSection).PrimaryGroup.Name);
+                    FOmfFixup.TargetDatum:=TOmfObjSection(ObjSection).PrimaryGroup.index;
                   end
                   end
                 else
                 else
                   begin
                   begin
@@ -504,7 +495,7 @@ implementation
               internalerror(2015041401);
               internalerror(2015041401);
             FOmfFixup.FrameMethod:=ffmTarget;
             FOmfFixup.FrameMethod:=ffmTarget;
             FOmfFixup.TargetMethod:=ftmGroupIndexNoDisp;
             FOmfFixup.TargetMethod:=ftmGroupIndexNoDisp;
-            FOmfFixup.TargetDatum:=GetGroupIndex(group.Name);
+            FOmfFixup.TargetDatum:=group.index;
           end
           end
         else
         else
          internalerror(2015040702);
          internalerror(2015040702);