Bläddra i källkod

* Double LONG (-1) and LONG (0) for x86_64 linker script

git-svn-id: trunk@17862 -
pierre 14 år sedan
förälder
incheckning
446c128e71
1 ändrade filer med 31 tillägg och 2 borttagningar
  1. 31 2
      compiler/systems/t_win.pas

+ 31 - 2
compiler/systems/t_win.pas

@@ -986,13 +986,25 @@ implementation
             Concat('  SYMBOL ___CTOR_LIST__');
             Concat('  SYMBOL __CTOR_LIST__');
             Concat('  LONG -1');
+{$ifdef x86_64}
+            Concat('  LONG -1');
+{$endif x86_64}
             Concat('  OBJSECTION .ctor*');
             Concat('  LONG 0');
+{$ifdef x86_64}
+            Concat('  LONG 0');
+{$endif x86_64}
             Concat('  SYMBOL ___DTOR_LIST__');
             Concat('  SYMBOL __DTOR_LIST__');
             Concat('  LONG -1');
+{$ifdef x86_64}
+            Concat('  LONG -1');
+{$endif x86_64}
             Concat('  OBJSECTION .dtor*');
             Concat('  LONG 0');
+{$ifdef x86_64}
+            Concat('  LONG 0');
+{$endif x86_64}
             Concat('  SYMBOL etext');
             Concat('ENDEXESECTION');
             Concat('EXESECTION .data');
@@ -1037,6 +1049,9 @@ implementation
             Concat('  PROVIDE(___crt_xl_end__)');
             { Add a nil pointer as last element }
             Concat('  LONG 0');
+{$ifdef x86_64}
+            Concat('  LONG 0');
+{$endif x86_64}
             Concat('  SYMBOL ___crt_xp_start__');
             Concat('  OBJSECTION SORT(.CRT$XP*'); {  /* Pre-termination */');}
             Concat('  SYMBOL ___crt_xp_end__');
@@ -1250,9 +1265,23 @@ implementation
             Add('    *(.glue_7)');
             Add('    . = ALIGN(8);');
             Add('     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;');
-            Add('			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);');
+            Add('    LONG (-1);');
+{$ifdef x86_64}
+            Add('    LONG (-1);');
+{$endif x86_64}
+            Add('    *(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);');
+{$ifdef x86_64}
+            Add('    LONG (0);');
+{$endif x86_64}
             Add('     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;');
-            Add('			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);');
+            Add('    LONG (-1);');
+{$ifdef x86_64}
+            Add('    LONG (-1);');
+{$endif x86_64}
+            Add('    *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);');
+{$ifdef x86_64}
+            Add('    LONG (0);');
+{$endif x86_64}
             Add('     *(.fini)');
             Add('    PROVIDE (etext = .);');
             Add('    *(.gcc_except_table)');