[LLVMdev] Typo in IsLegalToCallImmediateAddr?

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Oct 21 05:42:44 PDT 2011


2011/10/21 David Meyer <pdox at google.com>> Rafael,
>
> I believe MachO can't represent this relocation, even in non-PIC mode.
> On my Mac, I tried compiling "call 256". I got:

I think PIC is just the default (the kernel being non-PIC for
example), but I am not sure.

> in section __TEXT,__text reloc 0: R_ABS reloc but no absolute symbol
> at target address
>
> I believe the correct thing to do is:
>
> isTargetELF() && TM.getRelocationModel() == Reloc::Static
>
> This will do the right thing on ELF, and the right thing on other
> formats. This may have been the original intent.

Could be, echristo, bigcheese, would this be correct for Mach-O and COFF?

> - pdox
>

Cheers,
Rafael



More information about the llvm-dev mailing list