[llvm] r181451 - [PowerPC] Add some missing PPC64 relocs
Ulrich Weigand
ulrich.weigand at de.ibm.com
Wed May 8 10:50:57 PDT 2013
Author: uweigand
Date: Wed May 8 12:50:57 2013
New Revision: 181451
URL: http://llvm.org/viewvc/llvm-project?rev=181451&view=rev
Log:
[PowerPC] Add some missing PPC64 relocs
All R_PPC_... relocs should also be present (using the same number)
under the corresponding R_PPC64_... name. The latter were missing
for a couple of cases, which this patch adds.
This is not a big problem when emitting the reloc, because we can
just use the R_PPC_... define instead. But it is a problem when
*dumping* relocations e.g. using llvm-readobj, because this will
expect only R_PPC64_... values when inspecting a ppc64 ELF file.
Modified:
llvm/trunk/include/llvm/Object/ELF.h
llvm/trunk/include/llvm/Support/ELF.h
Modified: llvm/trunk/include/llvm/Object/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=181451&r1=181450&r2=181451&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Wed May 8 12:50:57 2013
@@ -2069,10 +2069,18 @@ StringRef ELFObjectFile<ELFT>::getReloca
switch (Type) {
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_NONE);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR32);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR24);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR16);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR16_LO);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR16_HI);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR16_HA);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR14);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR14_BRTAKEN);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR14_BRNTAKEN);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_REL24);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_REL14);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_REL14_BRTAKEN);
+ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_REL14_BRNTAKEN);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_REL32);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR64);
LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC64_ADDR16_HIGHER);
Modified: llvm/trunk/include/llvm/Support/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ELF.h?rev=181451&r1=181450&r2=181451&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ELF.h (original)
+++ llvm/trunk/include/llvm/Support/ELF.h Wed May 8 12:50:57 2013
@@ -468,10 +468,18 @@ enum {
enum {
R_PPC64_NONE = 0,
R_PPC64_ADDR32 = 1,
+ R_PPC64_ADDR24 = 2,
+ R_PPC64_ADDR16 = 3,
R_PPC64_ADDR16_LO = 4,
R_PPC64_ADDR16_HI = 5,
+ R_PPC64_ADDR16_HA = 6,
R_PPC64_ADDR14 = 7,
+ R_PPC64_ADDR14_BRTAKEN = 8,
+ R_PPC64_ADDR14_BRNTAKEN = 9,
R_PPC64_REL24 = 10,
+ R_PPC64_REL14 = 11,
+ R_PPC64_REL14_BRTAKEN = 12,
+ R_PPC64_REL14_BRNTAKEN = 13,
R_PPC64_REL32 = 26,
R_PPC64_ADDR64 = 38,
R_PPC64_ADDR16_HIGHER = 39,
More information about the llvm-commits
mailing list