Skip to content

Commit

Permalink
Fix for .pdata and .xdata section attributes on COFF.
Browse files Browse the repository at this point in the history
Patch by [email protected] !


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161487 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
asl committed Aug 8, 2012
1 parent 0bd3dee commit 0a0e50c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions lib/MC/MCObjectFileInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,13 @@ void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) {
PDataSection =
Ctx->getCOFFSection(".pdata",
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ |
COFF::IMAGE_SCN_MEM_WRITE,
COFF::IMAGE_SCN_MEM_READ,
SectionKind::getDataRel());

XDataSection =
Ctx->getCOFFSection(".xdata",
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ |
COFF::IMAGE_SCN_MEM_WRITE,
COFF::IMAGE_SCN_MEM_READ,
SectionKind::getDataRel());
TLSDataSection =
Ctx->getCOFFSection(".tls$",
Expand Down
6 changes: 2 additions & 4 deletions lib/MC/MCWin64EH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ static const MCSection *getWin64EHTableSection(StringRef suffix,

return context.getCOFFSection((".xdata"+suffix).str(),
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ |
COFF::IMAGE_SCN_MEM_WRITE,
COFF::IMAGE_SCN_MEM_READ,
SectionKind::getDataRel());
}

Expand All @@ -239,8 +238,7 @@ static const MCSection *getWin64EHFuncTableSection(StringRef suffix,
return context.getObjectFileInfo()->getPDataSection();
return context.getCOFFSection((".pdata"+suffix).str(),
COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
COFF::IMAGE_SCN_MEM_READ |
COFF::IMAGE_SCN_MEM_WRITE,
COFF::IMAGE_SCN_MEM_READ,
SectionKind::getDataRel());
}

Expand Down

0 comments on commit 0a0e50c

Please sign in to comment.