[PATCH] [yaml2obj] ELF Relocations Support
Shankar Kalpathi Easwaran
shankarke at gmail.com
Mon Apr 7 12:40:25 PDT 2014
================
Comment at: lib/Object/ELFYAML.cpp:339-379
@@ +338,43 @@
+ IO &IO, ELFYAML::ELF_REL &Value) {
+#define ECase(X) IO.enumCase(Value, #X, ELF::X);
+ // X86_64
+ ECase(R_X86_64_NONE)
+ ECase(R_X86_64_64)
+ ECase(R_X86_64_PC32)
+ ECase(R_X86_64_GOT32)
+ ECase(R_X86_64_PLT32)
+ ECase(R_X86_64_COPY)
+ ECase(R_X86_64_GLOB_DAT)
+ ECase(R_X86_64_JUMP_SLOT)
+ ECase(R_X86_64_RELATIVE)
+ ECase(R_X86_64_GOTPCREL)
+ ECase(R_X86_64_32)
+ ECase(R_X86_64_32S)
+ ECase(R_X86_64_16)
+ ECase(R_X86_64_PC16)
+ ECase(R_X86_64_8)
+ ECase(R_X86_64_PC8)
+ ECase(R_X86_64_DTPMOD64)
+ ECase(R_X86_64_DTPOFF64)
+ ECase(R_X86_64_TPOFF64)
+ ECase(R_X86_64_TLSGD)
+ ECase(R_X86_64_TLSLD)
+ ECase(R_X86_64_DTPOFF32)
+ ECase(R_X86_64_GOTTPOFF)
+ ECase(R_X86_64_TPOFF32)
+ ECase(R_X86_64_PC64)
+ ECase(R_X86_64_GOTOFF64)
+ ECase(R_X86_64_GOTPC32)
+ ECase(R_X86_64_GOT64)
+ ECase(R_X86_64_GOTPCREL64)
+ ECase(R_X86_64_GOTPC64)
+ ECase(R_X86_64_GOTPLT64)
+ ECase(R_X86_64_PLTOFF64)
+ ECase(R_X86_64_SIZE32)
+ ECase(R_X86_64_SIZE64)
+ ECase(R_X86_64_GOTPC32_TLSDESC)
+ ECase(R_X86_64_TLSDESC_CALL)
+ ECase(R_X86_64_TLSDESC)
+ ECase(R_X86_64_IRELATIVE)
+ // MIPS
+ ECase(R_MIPS_NONE)
----------------
will this switch become too long ? also I think some of the relocation values might overlap too.
http://reviews.llvm.org/D3302
More information about the llvm-commits
mailing list