* Don't place symbols with vo_force_finalize flag into read-only sections, resolves #26691.

git-svn-id: trunk@28626 -
This commit is contained in:
sergei 2014-09-08 19:41:24 +00:00
parent 5479b6e722
commit 8f1e058ac2

View File

@ -64,13 +64,15 @@ implementation
if not(target_info.system in systems_typed_constants_node_init) then
begin
if sym.varspez=vs_const then
cursectype:=sec_rodata
else
cursectype:=sec_data;
maybe_new_object_file(list);
tcbuilder:=tasmlisttypedconstbuilderclass(ctypedconstbuilder).create(sym);
reslist:=tasmlisttypedconstbuilder(tcbuilder).parse_into_asmlist;
{ Certain types like windows WideString are initialized at runtime and cannot
be placed into readonly memory }
if (sym.varspez=vs_const) and not (vo_force_finalize in sym.varoptions) then
cursectype:=sec_rodata
else
cursectype:=sec_data;
tcbuilder.free;
end
else