diff --git a/compiler/hlcgobj.pas b/compiler/hlcgobj.pas index 8d609e4950..848dc1987b 100644 --- a/compiler/hlcgobj.pas +++ b/compiler/hlcgobj.pas @@ -5497,8 +5497,13 @@ implementation alt:=al_pure_assembler; { add the procedure to the al_procedures } maybe_new_object_file(current_asmdata.asmlists[alt]); +{$ifdef symansistr} if pd.section<>'' then new_proc_section(current_asmdata.asmlists[alt],sec_user,lower(pd.section),getprocalign) +{$else symansistr} + if assigned(pd.section) then + new_proc_section(current_asmdata.asmlists[alt],sec_user,lower(pd.section^),getprocalign) +{$endif symansistr} else new_section(current_asmdata.asmlists[alt],sec_code,lower(pd.mangledname),getprocalign); current_asmdata.asmlists[alt].concatlist(code); diff --git a/compiler/pdecsub.pas b/compiler/pdecsub.pas index 94d8628e22..61c262ee35 100644 --- a/compiler/pdecsub.pas +++ b/compiler/pdecsub.pas @@ -2422,7 +2422,11 @@ begin internalerror(2021032801); if not (target_info.system in systems_allow_section) then Comment(V_Error,'Directive section not allowed for this target.'); +{$ifdef symansistr} tprocdef(pd).section:=get_stringconst; +{$else symansistr} + tprocdef(pd).section:=stringdup(get_stringconst); +{$endif} end; type diff --git a/compiler/symdef.pas b/compiler/symdef.pas index e5ee55e487..79a19e1c85 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -695,7 +695,6 @@ interface { number of user visible parameters } maxparacount, minparacount : byte; - section : ansistring; constructor create(dt:tdeftyp;level:byte;doregister:boolean); constructor ppuload(dt:tdeftyp;ppufile:tcompilerppufile); destructor destroy;override; @@ -866,6 +865,11 @@ interface visibility : tvisibility; {$ifndef DISABLE_FAST_OVERLOAD_PATCH} seenmarker : pointer; // used for filtering in tcandidate +{$endif} +{$ifdef symansistr} + section: ansistring; +{$else symansistr} + section: pshortstring; {$endif} constructor create(level:byte;doregister:boolean);virtual; constructor ppuload(ppufile:tcompilerppufile);