[llvm-branch-commits] [llvm-branch] r181816 - Merging r181450:
Bill Wendling
isanbard at gmail.com
Tue May 14 11:35:11 PDT 2013
Author: void
Date: Tue May 14 13:35:11 2013
New Revision: 181816
URL: http://llvm.org/viewvc/llvm-project?rev=181816&view=rev
Log:
Merging r181450:
------------------------------------------------------------------------
r181450 | uweigand | 2013-05-08 10:50:07 -0700 (Wed, 08 May 2013) | 16 lines
[PowerPC] Fix regression in generating @ha/@l relocs
The patch I committed as revision 167864 introduced a regression that
causes LLVM to no longer generate appropriate relocs for @ha/@l symbol
references (but fail an assertion instead).
This is fixed here by re-enabling support for the VK_PPC_GAS_HA16/
VK_PPC_GAS_LO16 variant kinds (and their Darwin variants) in
PPCELFObjectWriter.cpp.
Tested by running projects/test-suite in -m32 mode with the integrated
assembler forced on. A standalone test case will be committed shortly
as well.
------------------------------------------------------------------------
Modified:
llvm/branches/release_33/ (props changed)
llvm/branches/release_33/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
Propchange: llvm/branches/release_33/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 14 13:35:11 2013
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,181286,181296,181313,181397,181423,181586,181800
+/llvm/trunk:155241,181286,181296,181313,181397,181423,181450,181586,181800
Modified: llvm/branches/release_33/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_33/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp?rev=181816&r1=181815&r2=181816&view=diff
==============================================================================
--- llvm/branches/release_33/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (original)
+++ llvm/branches/release_33/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp Tue May 14 13:35:11 2013
@@ -107,7 +107,8 @@ unsigned PPCELFObjectWriter::getRelocTyp
case MCSymbolRefExpr::VK_PPC_DTPREL16_HA:
Type = ELF::R_PPC64_DTPREL16_HA;
break;
- case MCSymbolRefExpr::VK_None:
+ case MCSymbolRefExpr::VK_PPC_GAS_HA16:
+ case MCSymbolRefExpr::VK_PPC_DARWIN_HA16:
Type = ELF::R_PPC_ADDR16_HA;
break;
case MCSymbolRefExpr::VK_PPC_TOC16_HA:
@@ -134,6 +135,10 @@ unsigned PPCELFObjectWriter::getRelocTyp
Type = ELF::R_PPC64_DTPREL16_LO;
break;
case MCSymbolRefExpr::VK_None:
+ Type = ELF::R_PPC_ADDR16;
+ break;
+ case MCSymbolRefExpr::VK_PPC_GAS_LO16:
+ case MCSymbolRefExpr::VK_PPC_DARWIN_LO16:
Type = ELF::R_PPC_ADDR16_LO;
break;
case MCSymbolRefExpr::VK_PPC_TOC_ENTRY:
@@ -156,6 +161,10 @@ unsigned PPCELFObjectWriter::getRelocTyp
case MCSymbolRefExpr::VK_None:
Type = ELF::R_PPC64_ADDR16_DS;
break;
+ case MCSymbolRefExpr::VK_PPC_GAS_LO16:
+ case MCSymbolRefExpr::VK_PPC_DARWIN_LO16:
+ Type = ELF::R_PPC64_ADDR16_LO_DS;
+ break;
case MCSymbolRefExpr::VK_PPC_TOC_ENTRY:
Type = ELF::R_PPC64_TOC16_DS;
break;
More information about the llvm-branch-commits
mailing list