mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 15:29:16 +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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user