[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)
commite3959eb54ebf5a2a8997fa79c5d1dd2a1e4eab75
tree8bfaafc367418f5eb8f9999940338dff0c7d7194
parent6982fa4bb0dfb286414e24f54a20a3b08eae5c59
[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.

llvm-svn: 230801
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
llvm/test/CodeGen/PowerPC/pr22711.ll [new file with mode: 0644]