Przeglądaj źródła

* Fixed alignment of '.data' section, which got accidentally changed from 16 to 8 by r21374, causing e.g. tests/test/tasm3.pp to crash if compiled without -Cg and on target without tf_smartlink_sections. The root problem is not here, however: if appending data with higher alignment to a section with lower alignment, we likely need to raise the alignment of section.

git-svn-id: trunk@21731 -
sergei 13 lat temu
rodzic
commit
1284be72ea
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      compiler/ogelf.pas

+ 1 - 1
compiler/ogelf.pas

@@ -734,7 +734,7 @@ implementation
         { we need at least the following sections }
         createsection(sec_code);
         { always a non-PIC data section (will remain empty if doing PIC) }
-        createsection('.data',sizeof(pint),sectiontype2options(sec_data));
+        createsection('.data',sectiontype2align(sec_data),sectiontype2options(sec_data));
         createsection(sec_bss);
         if (cs_create_pic in current_settings.moduleswitches) and
            not(target_info.system in systems_darwin) then