mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
* 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:
parent
5479b6e722
commit
8f1e058ac2
@ -64,13 +64,15 @@ implementation
|
|||||||
|
|
||||||
if not(target_info.system in systems_typed_constants_node_init) then
|
if not(target_info.system in systems_typed_constants_node_init) then
|
||||||
begin
|
begin
|
||||||
if sym.varspez=vs_const then
|
|
||||||
cursectype:=sec_rodata
|
|
||||||
else
|
|
||||||
cursectype:=sec_data;
|
|
||||||
maybe_new_object_file(list);
|
maybe_new_object_file(list);
|
||||||
tcbuilder:=tasmlisttypedconstbuilderclass(ctypedconstbuilder).create(sym);
|
tcbuilder:=tasmlisttypedconstbuilderclass(ctypedconstbuilder).create(sym);
|
||||||
reslist:=tasmlisttypedconstbuilder(tcbuilder).parse_into_asmlist;
|
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;
|
tcbuilder.free;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user