mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Static local methods and variables, fixed erroneous 'this' capture
This commit is contained in:
parent
3c74588e10
commit
d9725dda7c
6 changed files with 97 additions and 13 deletions
|
@ -2062,6 +2062,17 @@ void BeCOFFObject::Generate(BeModule* module)
|
|||
sect.mRelocs.push_back(reloc);
|
||||
sect.mData.Write((int64)0);
|
||||
}
|
||||
else if (auto constVal = BeValueDynCast<BeConstant>(globalVar->mInitializer))
|
||||
{
|
||||
MarkSectionUsed(mDataSect);
|
||||
sym->mSectionNum = mDataSect.mSectionIdx + 1;
|
||||
mDataSect.mData.Align(globalVar->mAlign);
|
||||
mDataSect.mAlign = BF_MAX(mDataSect.mAlign, globalVar->mAlign);
|
||||
|
||||
AlignConst(mDataSect, constVal);
|
||||
sym->mValue = mDataSect.mData.GetSize();
|
||||
WriteConst(mDataSect, constVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
MarkSectionUsed(mBSSSect);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue