[PATCH] [MC] Write padding into fragments when -mc-relax-all flag is used
Mark Seaborn
mseaborn at chromium.org
Thu May 28 09:48:21 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: llvm/trunk/lib/MC/MCObjectStreamer.cpp:148
@@ +147,3 @@
+ auto *F = dyn_cast_or_null<MCDataFragment>(getCurrentFragment());
+ if (F && !(getAssembler().isBundlingEnabled() &&
+ getAssembler().getRelaxAll())) {
----------------
What is the reason for checking isBundlingEnabled() and getRelaxAll() here?
Could this explain why references to data sections are coming out wrong? (See the bug described here: https://chromiumcodereview.appspot.com/1129013004/#msg5)
You are calling flushPendingLabels() from mergeFragment(), but that doesn't get called if we are processing data sections. (mergeFragment() is called from EmitInstToData().)
When we are processing data directives such as ".long" or ".asciz", what would cause labels to get their offsets set (via setOffset())?
http://reviews.llvm.org/D8072
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list