[LLVMdev] Typo in IsLegalToCallImmediateAddr?

David Meyer pdox at google.com
Fri Oct 21 00:10:45 PDT 2011


Rafael,

I believe MachO can't represent this relocation, even in non-PIC mode.
On my Mac, I tried compiling "call 256". I got:

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.

- pdox



More information about the llvm-dev mailing list