Browse Source

* align data, bss and text sections to 16 byte boundaries

git-svn-id: trunk@3286 -
florian 19 years ago
parent
commit
83f4ab0f4a
1 changed files with 10 additions and 4 deletions
  1. 10 4
      compiler/ogbase.pas

+ 10 - 4
compiler/ogbase.pas

@@ -774,10 +774,16 @@ implementation
 
     function TObjData.sectiontype2align(atype:TAsmSectiontype):shortint;
       begin
-        if atype in [sec_stabstr,sec_debug_info,sec_debug_line,sec_debug_abbrev] then
-          result:=1
-        else
-          result:=sizeof(aint);
+        case atype of
+          sec_stabstr,sec_debug_info,sec_debug_line,sec_debug_abbrev:
+            result:=1;
+          sec_code,
+          sec_bss,
+          sec_data:
+            result:=16;
+          else
+            result:=sizeof(aint);
+        end;
       end;