From deb86a9e706919965af3233e13a10c770a2adf7c Mon Sep 17 00:00:00 2001 From: svenbarth Date: Sun, 29 Jan 2017 17:33:30 +0000 Subject: [PATCH] * Windows and GNU AS both correctly handle read only sections with relocations, so make use of that git-svn-id: trunk@35363 - --- compiler/aggas.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/aggas.pas b/compiler/aggas.pas index 2b525e209f..1a023d0ef9 100644 --- a/compiler/aggas.pas +++ b/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;