浏览代码

+ first linker script for arm-embedded

git-svn-id: trunk@12596 -
florian 16 年之前
父节点
当前提交
2a29180517
共有 1 个文件被更改,包括 30 次插入1 次删除
  1. 30 1
      compiler/systems/t_embed.pas

+ 30 - 1
compiler/systems/t_embed.pas

@@ -207,7 +207,36 @@ begin
       end;
       end;
    end;
    end;
 
 
-{ Write and Close response }
+{$ifdef ARM}
+  Add('SECTIONS');
+  Add('{');
+  Add('	/* interrupt vectors */');
+  Add('	. = 0x0;  /* start of flash */');
+  Add('	.init :');
+  Add('    {');
+  Add('    *(.init)');
+  Add('    }');
+  Add('    /* code and constants */');
+  Add('    .text :');
+  Add('    {');
+  Add('    *(.text)');
+  Add('    *(.strings)');
+  Add('    *(.rodata.*)');
+  Add('    *(.comment)');
+  Add('    }');
+  Add('    /* uninitialized data */');
+  Add('    . = 0x40000000;  /* start of ram */');
+  Add('    .bss :');
+  Add('    {');
+  Add('    *(.bss)');
+  Add('    *(COMMON)');
+  Add('    *(.data)');
+  Add('    KEEP (*(.fpc .fpc.n_version .fpc.n_links))');
+  Add('    }');
+  Add('}');
+{$endif ARM}
+
+  { Write and Close response }
   linkres.writetodisk;
   linkres.writetodisk;
   linkres.free;
   linkres.free;