Explorar o código

* initialization of stack and dwarf debug omf sections moved from
TOmfObjSection.create to TOmfObjData.createsection and is now based on the
section type (TAsmSectionType) instead of name (string)

git-svn-id: trunk@31485 -

nickysn %!s(int64=10) %!d(string=hai) anos
pai
achega
3abfa177c4
Modificáronse 1 ficheiros con 4 adicións e 7 borrados
  1. 4 7
      compiler/ogomf.pas

+ 4 - 7
compiler/ogomf.pas

@@ -473,13 +473,6 @@ implementation
         inherited create(AList, Aname, Aalign, Aoptions);
         FCombination:=scPublic;
         FUse:=suUse16;
-        if Aname='stack' then
-          FCombination:=scStack
-        else if (Aname='debug_frame') or
-                (Aname='debug_info') or
-                (Aname='debug_line') or
-                (Aname='debug_abbrev') then
-          FUse:=suUse32;
       end;
 
     function TOmfObjSection.MemPosStr(AImageBase: qword): string;
@@ -563,6 +556,10 @@ implementation
       begin
         Result:=inherited createsection(atype, aname, aorder);
         TOmfObjSection(Result).FClassName:=sectiontype2class(atype);
+        if atype=sec_stack then
+          TOmfObjSection(Result).FCombination:=scStack
+        else if atype in [sec_debug_frame,sec_debug_info,sec_debug_line,sec_debug_abbrev] then
+          TOmfObjSection(Result).FUse:=suUse32;
         if section_belongs_to_dgroup(atype) then
           TOmfObjSection(Result).FPrimaryGroup:='DGROUP';
       end;