[llvm-commits] [llvm] r136689 - in /llvm/trunk: include/llvm/Support/ELF.h lib/MC/ELFObjectWriter.cpp lib/MC/ELFObjectWriter.h lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp

Roman Divacky rdivacky at freebsd.org
Tue Aug 2 09:21:21 PDT 2011


>    uint64_t RelocOffset = Layout.getFragmentOffset(Fragment) +
>      Fixup.getOffset();
> +  switch ((unsigned)Fixup.getKind()) {
> +    case PPC::fixup_ppc_ha16:
> +    case PPC::fixup_ppc_lo16:
> +      RelocOffset += 2;
> +      break;
> +    default:
> +      break;
> +  }

This broke some tests because the fixup kind matched on other architectures as
well. I commented this code out in r136692 to fix the buildbots.


What would be the preferred solution to this? Introduce adjustFixupOffset()
method in MCELFObjectTargetWriter that would the target classes overwrite
and which would have the afore mentioned code in
PPCELFObjectWriter::adjustFixupOffset() ?

roman

p.s. sorry for the breakage



More information about the llvm-commits mailing list