[PowerPC] Fix PR22711 - Misaligned .toc section
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 27 Feb 2015 22:14:10 +0000 (22:14 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 27 Feb 2015 22:14:10 +0000 (22:14 +0000)
commit0e1e8e2f620a3ff0d397b30ef0fc2c8e8d8f1aaf
tree12d04878ed55d3d44cea0df57e43b708d2119060
parent9f9dcf8046b95ca3ce8e8742e1d75fa6553cbc6a
[PowerPC] Fix PR22711 - Misaligned .toc section

Straightforward patch to emit an alignment directive when emitting a
TOC entry.  The test case was generated from the test in PR22711 that
demonstrated a misaligned .toc section.  The object code is run
through llvm-readobj to verify that the correct alignment has been
applied to the .toc section.

Thanks to Ulrich Weigand for running down where the fix was needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230801 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
test/CodeGen/PowerPC/pr22711.ll [new file with mode: 0644]