summaryrefslogtreecommitdiff
path: root/compiler/ptconst.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ptconst.pas')
-rw-r--r--compiler/ptconst.pas17
1 files changed, 10 insertions, 7 deletions
diff --git a/compiler/ptconst.pas b/compiler/ptconst.pas
index 7bfbe73d68..cf83de56c1 100644
--- a/compiler/ptconst.pas
+++ b/compiler/ptconst.pas
@@ -135,13 +135,16 @@ implementation
current_asmdata.asmlists[al_const].concatlist(datalist);
{ the (empty) lists themselves are freed by tcbuilder }
- { add indirect symbol }
- { ToDo: do we also need this for the else part? }
- new_section(list,sec_rodata,lower(sym.mangledname),const_align(sym.vardef.alignment));
- symind:=current_asmdata.DefineAsmSymbol(sym.mangledname,AB_INDIRECT,AT_DATA);
- list.concat(Tai_symbol.Create_Global(symind,0));
- list.concat(Tai_const.Createname(sym.mangledname,AT_DATA,0));
- list.concat(tai_symbol_end.Create(symind));
+ if (tf_supports_packages in target_info.flags) then
+ begin
+ { add indirect symbol }
+ { ToDo: do we also need this for the else part? }
+ new_section(list,sec_rodata,lower(sym.mangledname),const_align(sym.vardef.alignment));
+ symind:=current_asmdata.DefineAsmSymbol(sym.mangledname,AB_INDIRECT,AT_DATA);
+ list.concat(Tai_symbol.Create_Global(symind,0));
+ list.concat(Tai_const.Createname(sym.mangledname,AT_DATA,0));
+ list.concat(tai_symbol_end.Create(symind));
+ end;
end
else
begin