[llvm-commits] [PATCH] PowerPC: Fix eh_frame relocation for PIC
Ulrich Weigand
Ulrich.Weigand at de.ibm.com
Wed Jan 9 04:43:40 PST 2013
Adhemerval Zanella <azanella at linux.vnet.ibm.com> wrote:
+ case ELF::R_PPC64_REL32 : {
+ uint64_t FinalAddress = (Section.LoadAddress + Offset);
+ int32_t delta = static_cast<int32_t>(Value - FinalAddress + Addend);
+ if (SignExtend32<32>(delta) != delta)
+ llvm_unreachable("Relocation R_PPC64_REL32 overflow");
+ // Generates a 'bl <address>' instruction
+ writeInt32BE(LocalAddress, 0x48000001 | (delta & 0x03FFFFFC));
+ } break;
This relocation should *not* create a bl instruction, just a plain
32-bit value ...
+ // FIXME: DW_EH_PE_indirect is not handled correctly for TTypeEncoding
With your change to emit the stubs, is this FIXME still needed?
Bye,
Ulrich
More information about the llvm-commits
mailing list