Browse Source

* fix section flags for stabs

git-svn-id: trunk@2838 -
peter 19 years ago
parent
commit
86a15e83e9
3 changed files with 9 additions and 12 deletions
  1. 5 5
      compiler/aggas.pas
  2. 4 5
      compiler/assemble.pas
  3. 0 2
      compiler/ogcoff.pas

+ 5 - 5
compiler/aggas.pas

@@ -516,18 +516,18 @@ implementation
 
            ait_align :
              begin
-               if tai_align(hp).aligntype>1 then
+               if tai_align_abstract(hp).aligntype>1 then
                  begin
                    if not(target_info.system in [system_powerpc_darwin,system_i386_darwin]) then
                      begin
-                       AsmWrite(#9'.balign '+tostr(tai_align(hp).aligntype));
-                       if tai_align(hp).use_op then
-                        AsmWrite(','+tostr(tai_align(hp).fillop))
+                       AsmWrite(#9'.balign '+tostr(tai_align_abstract(hp).aligntype));
+                       if tai_align_abstract(hp).use_op then
+                        AsmWrite(','+tostr(tai_align_abstract(hp).fillop))
                      end
                    else
                      begin
                        { darwin as only supports .align }
-                       if not ispowerof2(tai_align(hp).aligntype,i) then
+                       if not ispowerof2(tai_align_abstract(hp).aligntype,i) then
                          internalerror(2003010305);
                        AsmWrite(#9'.align '+tostr(i));
                        last_align := i;

+ 4 - 5
compiler/assemble.pas

@@ -905,8 +905,6 @@ Implementation
 
 
     function TInternalAssembler.TreePass0(hp:Tai):Tai;
-      var
-        objsym : TObjSymbol;
       begin
         while assigned(hp) do
          begin
@@ -963,8 +961,7 @@ Implementation
 
     function TInternalAssembler.TreePass1(hp:Tai):Tai;
       var
-        InlineLevel,
-        i : longint;
+        InlineLevel : longint;
         objsym : TObjSymbol;
       begin
         inlinelevel:=0;
@@ -1259,7 +1256,7 @@ Implementation
            ObjData.afteralloc;
            { leave if errors have occured }
            if errorcount>0 then
-             exit;
+             break;
 
            { Pass 1 }
            ObjData.currpass:=1;
@@ -1321,6 +1318,8 @@ Implementation
            { start next objectfile }
            NextSmartName(place);
          end;
+        ObjData.free;
+        ObjData:=nil;
       end;
 
 

+ 0 - 2
compiler/ogcoff.pas

@@ -629,8 +629,6 @@ const win32stub : array[0..131] of byte=(
               result:=result or PE_SCN_MEM_READ;
           end
         else
-          result:=result or PE_SCN_LNK_REMOVE;
-        if oso_debug in aoptions then
           result:=result or PE_SCN_MEM_DISCARDABLE;
         case aalign of
            1 : result:=result or PE_SCN_ALIGN_1BYTES;