Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(685)

Unified Diff: lib/MC/MCAssembler.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/MC/MCAsmStreamer.cpp ('k') | lib/MC/MCNaCl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/MC/MCAssembler.cpp
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 85d0c13c7104cea71b13898c6cd610fcff9e2aa2..b8860dfd02a1d479b7ce80535fe8906a1cb0d2af 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -17,6 +17,7 @@
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCExpr.h"
+#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCFixupKindInfo.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSection.h"
@@ -296,8 +297,16 @@ MCSectionData::MCSectionData(const MCSection &_Section, MCAssembler *A)
BundleGroupBeforeFirstInst(false),
HasInstructions(false)
{
- if (A)
+ // @LOCALMOD-BEGIN
+ if (A) {
+ // Necessary for IRT building because the IRT loader expects the end of
+ // the section to be bundle-aligned. Padding happens with 0's though,
+ // so it's not really ideal. TODO(dschuff) figure out how to do it right.
A->getSectionList().push_back(this);
+ if (A->isBundlingEnabled() && _Section.UseCodeAlign())
+ setAlignment(A->getBundleAlignSize());
+ }
+ // @LOCALMOD-END
}
MCSectionData::iterator
« no previous file with comments | « lib/MC/MCAsmStreamer.cpp ('k') | lib/MC/MCNaCl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698