Attached. You can also find it at http://people.freebsd.org/~jhibbits/hello_llvm.s . - Justin On Thu, Jun 26, 2014 at 1:26 PM, Rafael Avila de Espindola <rafael.espindola at gmail.com> wrote:> > > Sent from my iPhone > >> On Jun 26, 2014, at 12:33, Justin Hibbits <jrh29 at alumni.cwru.edu> wrote: >> >> I'm working on Position-independent code for 32-bit PowerPC, but >> running into a problem. At the beginning of each function, there's a >> pre-word that's the difference between the PICBase (.L1$pb) and the >> GOT. This works fine when generating assembly output, but it fails >> when generating ELF output, with the error "Cannot represent a >> difference across sections" (line 847, lib/MC/ELFObjectWriter.cpp). >> >> Roman Divacky suggested I try something with 'let EncoderMethod = ...' >> similar to how the TOC entries are done for ppc64. However, I'm not >> sure if that would work, given that the TOC on ppc64 is handled >> differently from the GOT on ppc32, and I'm not sure how to represent >> that if it could work. >> >> Any ideas on how a cross-section diff and relocation could be >> represented for this? >> > > > Can you post the generated assembly that works with gas but fails with llvm-mc? > >> Thanks, >> Justin >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: hello_llvm.s Type: application/octet-stream Size: 1618 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140626/5e90ac54/attachment.obj>
Rafael EspĂndola
2014-Jun-26 21:46 UTC
[LLVMdev] cross-section differences in MC generation
This reduces to .section .foo .L1: .L2 = .L1 .section .bar .long .L1-.L2 Which is fairly silly :-( I think this is the some root issue as pr20119. I will add the testcase to that PR. Cheers, Rafael
I think that's incorrect. It should to: .section .foo .L1: .L2 = .L1 .section .bar .long .L3-.L2 .L3: Because .L3 and .L2 are in different sections. - Justin On Thu, Jun 26, 2014 at 2:46 PM, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:> This reduces to > > .section .foo > .L1: > .L2 = .L1 > .section .bar > .long .L1-.L2 > > > Which is fairly silly :-( > > I think this is the some root issue as pr20119. I will add the > testcase to that PR. > > Cheers, > Rafael
Possibly Parallel Threads
- [LLVMdev] cross-section differences in MC generation
- [LLVMdev] cross-section differences in MC generation
- Potential bug in SelectionDAGLegalize::ConvertNodeToLibcall()?
- Potential bug in SelectionDAGLegalize::ConvertNodeToLibcall()?
- Potential bug in SelectionDAGLegalize::ConvertNodeToLibcall()?