mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 12:59:24 +02:00
+ initial (experimental) implementation of section-based smartlinking for i8086.
Use -dI8086_SMARTLINK_SECTIONS to enable. git-svn-id: trunk@39211 -
This commit is contained in:
parent
bfdd75eabf
commit
b9ab9e5782
@ -570,15 +570,35 @@ implementation
|
||||
end;
|
||||
|
||||
function TOmfObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
|
||||
var
|
||||
sep : string[3];
|
||||
secname : string;
|
||||
begin
|
||||
if (atype=sec_user) then
|
||||
Result:=aname
|
||||
else if omf_secnames[atype]=omf_secnames[sec_code] then
|
||||
Result:=CodeSectionName(aname)
|
||||
else if omf_segclass(atype)='FAR_DATA' then
|
||||
Result:=current_module.modulename^ + '_DATA'
|
||||
else
|
||||
Result:=omf_secnames[atype];
|
||||
begin
|
||||
if omf_secnames[atype]=omf_secnames[sec_code] then
|
||||
secname:=CodeSectionName(aname)
|
||||
else if omf_segclass(atype)='FAR_DATA' then
|
||||
secname:=current_module.modulename^ + '_DATA'
|
||||
else
|
||||
secname:=omf_secnames[atype];
|
||||
if create_smartlink_sections and (aname<>'') then
|
||||
begin
|
||||
case aorder of
|
||||
secorder_begin :
|
||||
sep:='.b_';
|
||||
secorder_end :
|
||||
sep:='.z_';
|
||||
else
|
||||
sep:='.n_';
|
||||
end;
|
||||
result:=secname+sep+aname
|
||||
end
|
||||
else
|
||||
result:=secname;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TOmfObjData.createsection(atype: TAsmSectionType; const aname: string; aorder: TAsmSectionOrder): TObjSection;
|
||||
@ -2910,7 +2930,7 @@ implementation
|
||||
asmbin : '';
|
||||
asmcmd : '';
|
||||
supported_targets : [system_i8086_msdos,system_i8086_embedded];
|
||||
flags : [af_outputbinary,af_no_debug];
|
||||
flags : [af_outputbinary,af_no_debug,af_smartlink_sections];
|
||||
labelprefix : '..@';
|
||||
comment : '; ';
|
||||
dollarsign: '$';
|
||||
|
@ -360,8 +360,14 @@ unit i_embed;
|
||||
system : system_i8086_embedded;
|
||||
name : 'Embedded';
|
||||
shortname : 'embedded';
|
||||
flags : [tf_use_8_3,tf_smartlink_library,
|
||||
tf_no_objectfiles_when_smartlinking,tf_cld,
|
||||
flags : [tf_use_8_3,
|
||||
{$ifdef I8086_SMARTLINK_SECTIONS}
|
||||
tf_smartlink_sections,
|
||||
{$else I8086_SMARTLINK_SECTIONS}
|
||||
tf_smartlink_library,
|
||||
tf_no_objectfiles_when_smartlinking,
|
||||
{$endif I8086_SMARTLINK_SECTIONS}
|
||||
tf_cld,
|
||||
tf_no_generic_stackcheck,tf_emit_stklen];
|
||||
cpu : cpu_i8086;
|
||||
unit_env : '';
|
||||
|
@ -41,9 +41,14 @@ unit i_msdos;
|
||||
system : system_i8086_msdos;
|
||||
name : 'MS-DOS 16-bit real mode';
|
||||
shortname : 'MSDOS';
|
||||
flags : [tf_use_8_3,tf_smartlink_library,
|
||||
tf_no_objectfiles_when_smartlinking,tf_cld,
|
||||
tf_no_generic_stackcheck,tf_emit_stklen];
|
||||
flags : [tf_use_8_3,
|
||||
{$ifdef I8086_SMARTLINK_SECTIONS}
|
||||
tf_smartlink_sections,
|
||||
{$else I8086_SMARTLINK_SECTIONS}
|
||||
tf_smartlink_library,
|
||||
tf_no_objectfiles_when_smartlinking,
|
||||
{$endif I8086_SMARTLINK_SECTIONS}
|
||||
tf_cld,tf_no_generic_stackcheck,tf_emit_stklen];
|
||||
cpu : cpu_i8086;
|
||||
unit_env : 'MSDOSUNITS';
|
||||
extradefines : '';
|
||||
|
@ -41,9 +41,14 @@ unit i_win16;
|
||||
system : system_i8086_win16;
|
||||
name : 'Win16 for x86';
|
||||
shortname : 'Win16';
|
||||
flags : [tf_use_8_3,tf_smartlink_library,
|
||||
tf_no_objectfiles_when_smartlinking,tf_cld,
|
||||
tf_no_generic_stackcheck,tf_emit_stklen,
|
||||
flags : [tf_use_8_3,
|
||||
{$ifdef I8086_SMARTLINK_SECTIONS}
|
||||
tf_smartlink_sections,
|
||||
{$else I8086_SMARTLINK_SECTIONS}
|
||||
tf_smartlink_library,
|
||||
tf_no_objectfiles_when_smartlinking,
|
||||
{$endif I8086_SMARTLINK_SECTIONS}
|
||||
tf_cld,tf_no_generic_stackcheck,tf_emit_stklen,
|
||||
tf_x86_far_procs_push_odd_bp];
|
||||
cpu : cpu_i8086;
|
||||
unit_env : 'WIN16UNITS';
|
||||
|
Loading…
Reference in New Issue
Block a user