[llvm-commits] [PATCH] PowerPC: Fix eh_frame relocation for PIC
Adhemerval Zanella
azanella at linux.vnet.ibm.com
Wed Jan 9 05:26:24 PST 2013
On 01/09/2013 10:43 AM, Ulrich Weigand wrote:
> 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 ...
Indeed, I'll fix it.
>
> + // FIXME: DW_EH_PE_indirect is not handled correctly for TTypeEncoding
>
> With your change to emit the stubs, is this FIXME still needed?
Not really, I'll remove the comment.
>
>
> Bye,
> Ulrich
>
More information about the llvm-commits
mailing list