[MC] When using bundle aligment, align sections to bundle size
authorDerek Schuff <dschuff@google.com>
Tue, 21 Apr 2015 00:14:25 +0000 (00:14 +0000)
committerDerek Schuff <dschuff@google.com>
Tue, 21 Apr 2015 00:14:25 +0000 (00:14 +0000)
commita49508cb92bd4e469979ffb16c4c754c5479a668
tree0e361cecd1ffa62eaa6a8c20f0ef959cbca2679d
parentb5750565de2920ee522aee16ebc3a37a3c62d566
[MC] When using bundle aligment, align sections to bundle size

Summary:
Bundle aligment requires that the functions always start at an aligned address.
Usually this is ensured by the compiler, but assembly code does not always
begin with a .align directive.

This change ensures that sections get the correct alignment if they contain
any instructions and bundling is enabled. (It also makes LLVM match the
behavior of GNU as).

Differential Revision: http://reviews.llvm.org/D9131

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235365 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCELFStreamer.cpp
test/MC/X86/AlignedBundling/section-alignment.s [new file with mode: 0644]