Browse Source

* properly align FPC_RESLOCATION so that linking does not fail on some architectures (e.g. ppc64)

git-svn-id: branches/resources@9710 -
tom_at_work 17 years ago
parent
commit
942d68b716
1 changed files with 3 additions and 0 deletions
  1. 3 0
      compiler/pmodules.pas

+ 3 - 0
compiler/pmodules.pas

@@ -255,6 +255,9 @@ implementation
       if (target_res.id in [res_elf,res_macho]) then
       if (target_res.id in [res_elf,res_macho]) then
         begin
         begin
         ResourceInfo:=TAsmList.Create;
         ResourceInfo:=TAsmList.Create;
+
+        maybe_new_object_file(ResourceInfo);
+        new_section(ResourceInfo,sec_data,'FPC_RESLOCATION',sizeof(aint));
         ResourceInfo.concat(Tai_symbol.Createname_global('FPC_RESLOCATION',AT_DATA,0));
         ResourceInfo.concat(Tai_symbol.Createname_global('FPC_RESLOCATION',AT_DATA,0));
         if ResourcesUsed then
         if ResourcesUsed then
           { Valid pointer to resource information }
           { Valid pointer to resource information }