* Uninitialised variables are no longer declared with .comm

git-svn-id: trunk@766 -
This commit is contained in:
daniel 2005-07-30 17:40:20 +00:00
parent b9b61c5a00
commit 6234341ef2
2 changed files with 19 additions and 9 deletions

View File

@ -513,6 +513,15 @@ var
ait_datablock :
begin
if Tai_datablock(hp).is_global then
begin
asmwrite(#9'.global ');
asmwriteln(Tai_datablock(hp).sym.name);
end;
asmwrite(Tai_datablock(hp).sym.name);
asmwriteln(':');
asmwriteln(#9'.skip '+tostr(Tai_datablock(hp).size));
{$ifdef disabled}
if (target_info.system <> system_powerpc_darwin) or
not tai_datablock(hp).is_global then
begin
@ -538,6 +547,7 @@ var
if not(lasTSectype in [sec_data,sec_none]) then
WriteSection(lasTSectype,'');
end;
{$endif}
end;
{$ifndef cpu64bit}

View File

@ -1088,20 +1088,20 @@ Implementation
if not (objectdata.currsec.sectype in [sec_bss,sec_threadvar]) then
Message(asmw_e_alloc_data_only_in_bss);
l:=used_align(size_2_align(Tai_datablock(hp).size),0,objectdata.currsec.addralign);
if Tai_datablock(hp).is_global and
{ if Tai_datablock(hp).is_global and
not SmartAsm then
begin
objectdata.allocsymbol(currpass,Tai_datablock(hp).sym,Tai_datablock(hp).size);
begin}
{ objectdata.allocsymbol(currpass,Tai_datablock(hp).sym,Tai_datablock(hp).size);}
{ force to be common/external, must be after setaddress as that would
set it to AB_GLOBAL }
Tai_datablock(hp).sym.currbind:=AB_COMMON;
{ Tai_datablock(hp).sym.currbind:=AB_COMMON;
end
else
begin
begin}
objectdata.allocalign(l);
objectdata.allocsymbol(currpass,Tai_datablock(hp).sym,Tai_datablock(hp).size);
objectdata.alloc(Tai_datablock(hp).size);
end;
{ end;}
objectlibrary.UsedAsmSymbolListInsert(Tai_datablock(hp).sym);
end;
ait_real_80bit :
@ -1286,11 +1286,11 @@ Implementation
l:=used_align(size_2_align(Tai_datablock(hp).size),0,objectdata.currsec.addralign);
objectdata.writesymbol(Tai_datablock(hp).sym);
objectoutput.exportsymbol(Tai_datablock(hp).sym);
if SmartAsm or (not Tai_datablock(hp).is_global) then
begin
{ if SmartAsm or (not Tai_datablock(hp).is_global) then
begin}
objectdata.allocalign(l);
objectdata.alloc(Tai_datablock(hp).size);
end;
{ end;}
end;
ait_real_80bit :
objectdata.writebytes(Tai_real_80bit(hp).value,10);