浏览代码

* Fixed resources support on Linux when internal assembler is used.
* Enabled multiple resources support on Linux.

git-svn-id: trunk@7883 -

yury 18 年之前
父节点
当前提交
b5e38fd2c8
共有 2 个文件被更改,包括 15 次插入12 次删除
  1. 13 10
      compiler/ogelf.pas
  2. 2 2
      compiler/systems/t_linux.pas

+ 13 - 10
compiler/ogelf.pas

@@ -581,7 +581,7 @@ implementation
           '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
           '.eh_frame',
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
-          'fpc',
+          '.fpc',
           '.toc',
           '.init'
         );
@@ -598,7 +598,7 @@ implementation
           '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
           '.eh_frame',
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
-          'fpc',
+          '.fpc',
           '.toc',
           '.init'
         );
@@ -614,14 +614,17 @@ implementation
         if (use_smartlink_section and
            (aname<>'')) or (atype=sec_fpc) then
           begin
-            case aorder of
-              secorder_begin :
-                sep:='.b_';
-              secorder_end :
-                sep:='.z_';
-              else
-                sep:='.n_';
-            end;
+            if (atype=sec_fpc) and (aname='resptrs') then
+              sep:='.'
+            else
+              case aorder of
+                secorder_begin :
+                  sep:='.b_';
+                secorder_end :
+                  sep:='.z_';
+                else
+                  sep:='.n_';
+              end;
             result:=secname+sep+aname
           end
         else

+ 2 - 2
compiler/systems/t_linux.pas

@@ -927,7 +927,7 @@ initialization
   RegisterImport(system_i386_linux,timportliblinux);
   RegisterExport(system_i386_linux,texportliblinux);
   RegisterTarget(system_i386_linux_info);
-  RegisterRes(res_elf32_info,TResourceFile);
+  RegisterRes(res_elf32_info,TWinLikeResourceFile);
 
   RegisterExternalLinker(system_x86_6432_linux_info,TLinkerLinux);
   RegisterImport(system_x86_6432_linux,timportliblinux);
@@ -963,7 +963,7 @@ initialization
   RegisterImport(system_x86_64_linux,timportliblinux);
   RegisterExport(system_x86_64_linux,texportliblinux);
   RegisterTarget(system_x86_64_linux_info);
-  RegisterRes(res_elf64_info,TResourceFile);
+  RegisterRes(res_elf64_info,TWinLikeResourceFile);
 {$endif x86_64}
 {$ifdef SPARC}
   RegisterExternalLinker(system_sparc_linux_info,TLinkerLinux);