* alignment of dwarf sections

git-svn-id: trunk@3059 -
This commit is contained in:
peter 2006-03-27 12:51:05 +00:00
parent 64da63e4ec
commit f9ccac3f30
3 changed files with 14 additions and 15 deletions

View File

@ -728,7 +728,10 @@ implementation
function TObjData.sectiontype2align(atype:TAsmSectiontype):shortint;
begin
result:=sizeof(aint);
if atype in [sec_stabstr,sec_debug_info,sec_debug_line,sec_debug_abbrev] then
result:=1
else
result:=sizeof(aint);
end;

View File

@ -834,8 +834,11 @@ const win32stub : array[0..131] of byte=(
procedure TCoffObjData.CreateDebugSections;
begin
stabssec:=createsection(sec_stab,'');
stabstrsec:=createsection(sec_stabstr,'');
if target_dbg.id=dbg_stabs then
begin
stabssec:=createsection(sec_stab,'');
stabstrsec:=createsection(sec_stabstr,'');
end;
end;

View File

@ -67,7 +67,6 @@ interface
constructor create(const n:string);override;
destructor destroy;override;
function sectionname(atype:TAsmSectiontype;const aname:string):string;override;
function sectiontype2align(atype:TAsmSectiontype):shortint;override;
procedure CreateDebugSections;override;
procedure writereloc(data,len:aint;p:TObjSymbol;relative:TObjRelocationType);override;
procedure writestab(offset:aint;ps:TObjSymbol;nidx,nother:byte;ndesc:word;p:pchar);override;
@ -611,19 +610,13 @@ implementation
end;
function TElfObjData.sectiontype2align(atype:TAsmSectiontype):shortint;
begin
if atype=sec_stabstr then
result:=1
else
result:=sizeof(aint);
end;
procedure TElfObjData.CreateDebugSections;
begin
stabssec:=createsection(sec_stab,'');
stabstrsec:=createsection(sec_stabstr,'');
if target_dbg.id=dbg_stabs then
begin
stabssec:=createsection(sec_stab,'');
stabstrsec:=createsection(sec_stabstr,'');
end;
end;