Przeglądaj źródła

Merged revisions 7997,8001 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r7997 | yury | 2007-07-10 00:17:07 +0300 (Вт, 10 июл 2007) | 1 line

* fixed debugging problem on arm-linux.
........
r8001 | yury | 2007-07-10 01:05:08 +0300 (Вт, 10 июл 2007) | 1 line

* Handle .fpc section by internal elf obj writer the same way as external assembler handles this section.
........

git-svn-id: branches/fixes_2_2@8006 -

yury 18 lat temu
rodzic
commit
94f0699d2f
2 zmienionych plików z 16 dodań i 15 usunięć
  1. 14 13
      compiler/ogelf.pas
  2. 2 2
      compiler/systems/t_linux.pas

+ 14 - 13
compiler/ogelf.pas

@@ -611,20 +611,21 @@ implementation
           secname:=secnames_pic[atype]
         else
           secname:=secnames[atype];
-        if (use_smartlink_section and
-           (aname<>'')) or (atype=sec_fpc) then
+        if (atype=sec_fpc) and (Copy(aname,1,3)='res') then
           begin
-            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+'.'+aname;
+            exit;
+          end;
+        if use_smartlink_section and (aname<>'') then
+          begin
+            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

@@ -616,7 +616,7 @@ begin
       add('  .data           :');
       add('  {');
       add('    *(.data .data.* .gnu.linkonce.d.*)');
-      add('    KEEP (*(.fpc .fpc.version .fpc.links))');
+      add('    KEEP (*(.fpc .fpc.n_version .fpc.n_links))');
       add('    KEEP (*(.gnu.linkonce.d.*personality*))');
       add('  }');
       add('  PROVIDE (_edata = .);');
@@ -746,7 +746,7 @@ begin
       add('  .data           :');
       add('  {');
       add('    *(.data .data.* .gnu.linkonce.d.*)');
-      add('    KEEP (*(.fpc .fpc.version .fpc.links))');
+      add('    KEEP (*(.fpc .fpc.n_version .fpc.n_links))');
       add('    KEEP (*(.gnu.linkonce.d.*personality*))');
       add('  }');
       add('  PROVIDE (_edata = .);');