mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 06:29:25 +01:00
* define common symbol when it is not available
git-svn-id: trunk@3447 -
This commit is contained in:
parent
36a57726ac
commit
6af8b52132
@ -1650,26 +1650,26 @@ implementation
|
||||
if assigned(objsym.exesymbol.objsymbol) then
|
||||
begin
|
||||
if objsym.exesymbol.ObjSymbol.size<>objsym.size then
|
||||
internalerror(200206301)
|
||||
else
|
||||
internalerror(200206301);
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ allocate new objsymbol in .bss of *COMMON* and assign
|
||||
it to the exesymbol }
|
||||
if firstcommon then
|
||||
begin
|
||||
{ allocate new objsymbol in .bss of *COMMON* and assign
|
||||
it to the exesymbol }
|
||||
if firstcommon then
|
||||
begin
|
||||
if assigned(exemap) then
|
||||
exemap.AddCommonSymbolsHeader;
|
||||
firstcommon:=false;
|
||||
end;
|
||||
internalObjData.setsection(commonObjSection);
|
||||
commonsym:=internalObjData.symboldefine(objsym.name,AB_GLOBAL,AT_FUNCTION);
|
||||
commonsym.size:=objsym.size;
|
||||
internalObjData.alloc(objsym.size);
|
||||
if assigned(exemap) then
|
||||
exemap.AddCommonSymbol(commonsym);
|
||||
{ Assign to the exesymbol }
|
||||
objsym.exesymbol.objsymbol:=commonsym
|
||||
exemap.AddCommonSymbolsHeader;
|
||||
firstcommon:=false;
|
||||
end;
|
||||
internalObjData.setsection(commonObjSection);
|
||||
commonsym:=internalObjData.symboldefine(objsym.name,AB_GLOBAL,AT_FUNCTION);
|
||||
commonsym.size:=objsym.size;
|
||||
internalObjData.alloc(objsym.size);
|
||||
if assigned(exemap) then
|
||||
exemap.AddCommonSymbol(commonsym);
|
||||
{ Assign to the exesymbol }
|
||||
objsym.exesymbol.objsymbol:=commonsym
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user