When instruction bundling is enabled and the -mc-relax-all flag is
set, we can write bundle padding directly into fragments and avoid
creating large number of fragments significantly reducing LLVM MC
memory usage.
Fixes https://code.google.com/p/nativeclient/issues/detail?id=4063
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())?