|
@@ -101,7 +101,9 @@ interface
|
|
public
|
|
public
|
|
constructor create(const n:string);override;
|
|
constructor create(const n:string);override;
|
|
function sectiontype2align(atype:TAsmSectiontype):shortint;override;
|
|
function sectiontype2align(atype:TAsmSectiontype):shortint;override;
|
|
|
|
+ function sectiontype2class(atype:TAsmSectiontype):string;
|
|
function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
|
|
function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
|
|
|
|
+ function createsection(atype:TAsmSectionType;const aname:string='';aorder:TAsmSectionOrder=secorder_default):TObjSection;override;
|
|
procedure writeReloc(Data:aint;len:aword;p:TObjSymbol;Reloctype:TObjRelocationType);override;
|
|
procedure writeReloc(Data:aint;len:aword;p:TObjSymbol;Reloctype:TObjRelocationType);override;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -474,45 +476,28 @@ implementation
|
|
FCombination:=scPublic;
|
|
FCombination:=scPublic;
|
|
FUse:=suUse16;
|
|
FUse:=suUse16;
|
|
if oso_executable in Aoptions then
|
|
if oso_executable in Aoptions then
|
|
- begin
|
|
|
|
- FClassName:='CODE';
|
|
|
|
- dgroup:=(current_settings.x86memorymodel=mm_tiny);
|
|
|
|
- end
|
|
|
|
|
|
+ dgroup:=(current_settings.x86memorymodel=mm_tiny)
|
|
else if Aname='stack' then
|
|
else if Aname='stack' then
|
|
begin
|
|
begin
|
|
- FClassName:='STACK';
|
|
|
|
FCombination:=scStack;
|
|
FCombination:=scStack;
|
|
dgroup:=current_settings.x86memorymodel in (x86_near_data_models-[mm_tiny]);
|
|
dgroup:=current_settings.x86memorymodel in (x86_near_data_models-[mm_tiny]);
|
|
end
|
|
end
|
|
else if Aname='heap' then
|
|
else if Aname='heap' then
|
|
- begin
|
|
|
|
- FClassName:='HEAP';
|
|
|
|
- dgroup:=current_settings.x86memorymodel in x86_near_data_models;
|
|
|
|
- end
|
|
|
|
|
|
+ dgroup:=current_settings.x86memorymodel in x86_near_data_models
|
|
else if Aname='bss' then
|
|
else if Aname='bss' then
|
|
- begin
|
|
|
|
- FClassName:='BSS';
|
|
|
|
- dgroup:=true;
|
|
|
|
- end
|
|
|
|
|
|
+ dgroup:=true
|
|
else if Aname='data' then
|
|
else if Aname='data' then
|
|
- begin
|
|
|
|
- FClassName:='DATA';
|
|
|
|
- dgroup:=true;
|
|
|
|
- end
|
|
|
|
|
|
+ dgroup:=true
|
|
else if (Aname='debug_frame') or
|
|
else if (Aname='debug_frame') or
|
|
(Aname='debug_info') or
|
|
(Aname='debug_info') or
|
|
(Aname='debug_line') or
|
|
(Aname='debug_line') or
|
|
(Aname='debug_abbrev') then
|
|
(Aname='debug_abbrev') then
|
|
begin
|
|
begin
|
|
- FClassName:='DWARF';
|
|
|
|
FUse:=suUse32;
|
|
FUse:=suUse32;
|
|
dgroup:=false;
|
|
dgroup:=false;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
- begin
|
|
|
|
- FClassName:='DATA';
|
|
|
|
- dgroup:=true;
|
|
|
|
- end;
|
|
|
|
|
|
+ dgroup:=true;
|
|
if dgroup then
|
|
if dgroup then
|
|
FPrimaryGroup:='DGROUP'
|
|
FPrimaryGroup:='DGROUP'
|
|
else
|
|
else
|
|
@@ -581,6 +566,11 @@ implementation
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+ function TOmfObjData.sectiontype2class(atype: TAsmSectiontype): string;
|
|
|
|
+ begin
|
|
|
|
+ Result:=omf_segclass[atype];
|
|
|
|
+ end;
|
|
|
|
+
|
|
function TOmfObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
|
|
function TOmfObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
|
|
begin
|
|
begin
|
|
if (atype=sec_user) then
|
|
if (atype=sec_user) then
|
|
@@ -591,6 +581,12 @@ implementation
|
|
Result:=omf_secnames[atype];
|
|
Result:=omf_secnames[atype];
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+ function TOmfObjData.createsection(atype: TAsmSectionType; const aname: string; aorder: TAsmSectionOrder): TObjSection;
|
|
|
|
+ begin
|
|
|
|
+ Result:=inherited createsection(atype, aname, aorder);
|
|
|
|
+ TOmfObjSection(Result).FClassName:=sectiontype2class(atype);
|
|
|
|
+ end;
|
|
|
|
+
|
|
procedure TOmfObjData.writeReloc(Data:aint;len:aword;p:TObjSymbol;Reloctype:TObjRelocationType);
|
|
procedure TOmfObjData.writeReloc(Data:aint;len:aword;p:TObjSymbol;Reloctype:TObjRelocationType);
|
|
var
|
|
var
|
|
objreloc: TOmfRelocation;
|
|
objreloc: TOmfRelocation;
|