瀏覽代碼

* Windows and GNU AS both correctly handle read only sections with relocations, so make use of that

git-svn-id: trunk@35363 -
svenbarth 8 年之前
父節點
當前提交
deb86a9e70
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      compiler/aggas.pas

+ 5 - 0
compiler/aggas.pas

@@ -357,6 +357,11 @@ implementation
           (target_info.system=system_i386_go32v2) then
           secname:='.data';
 
+        { Windows correctly handles reallocations in readonly sections }
+        if (atype=sec_rodata) and
+          (target_info.system in systems_all_windows+systems_nativent-[system_i8086_win16]) then
+          secname:='.rodata';
+
         { section type user gives the user full controll on the section name }
         if atype=sec_user then
           secname:=aname;