This patch removes some nondeterminism from direct object file output
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 14 Dec 2012 20:28:38 +0000 (20:28 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 14 Dec 2012 20:28:38 +0000 (20:28 +0000)
commita4f898448cdf9c153ecd2de3de4cbbd3f2eeabda
tree3ae1f3e12db527448d985623f2c55be63963274c
parent41ed60b7d8d635c4ba8a513e1be88aee399974d2
This patch removes some nondeterminism from direct object file output
for TLS dynamic models on 64-bit PowerPC ELF.  The default sort routine
for relocations only sorts on the r_offset field; but with TLS, there
can be two relocations with the same r_offset.  For PowerPC, this patch
sorts secondarily on descending r_type, which matches the behavior
expected by the linker.

llvm-svn: 170237
llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
llvm/test/CodeGen/PowerPC/tls-ld-obj.ll