Tim Northover
2013-Nov-06 18:45 UTC
[LLVMdev] "-relocation-model=static" does not work in llc compiler ?
> If you also give "-code-model=large" then LLVM won't assume that > "addr" is nearby so it'll use a movabsq with a static relocation.Actually, it seems our own Eli has written rather a good description of these code models: http://eli.thegreenplace.net/2012/01/03/understanding-the-x64-code-models/. Well worth the read (the default models he talks about at the top are essentially "static"). Cheers. Tim.
lipengcheng
2013-Nov-06 18:52 UTC
[LLVMdev] "-relocation-model=static" does not work in llc compiler ?
Yep. I tried it. It used a movabsq instruction instead and a static allocation. Thanks a lot. I will read it immediately. Again thanks. - Pengcheng On Nov 6, 2013, at 1:45 PM, Tim Northover <t.p.northover at gmail.com> wrote:>> If you also give "-code-model=large" then LLVM won't assume that >> "addr" is nearby so it'll use a movabsq with a static relocation. > > Actually, it seems our own Eli has written rather a good description > of these code models: > http://eli.thegreenplace.net/2012/01/03/understanding-the-x64-code-models/. > > Well worth the read (the default models he talks about at the top are > essentially "static"). > > Cheers. > > Tim.
lipengcheng
2013-Nov-06 18:57 UTC
[LLVMdev] "-relocation-model=static" does not work in llc compiler ?
Another finding is when I use both -code-model=large and -relocation-model=pic (!!!!!note changed), it still generate the static relocation. So does it mean -relocation-model=pic does not like to work with -code-model=large ? Thanks, -Pengcheng On Nov 6, 2013, at 1:52 PM, lipengcheng <pli at cs.rochester.edu> wrote:> Yep. I tried it. It used a movabsq instruction instead and a static allocation. > Thanks a lot. > > I will read it immediately. Again thanks. > > - Pengcheng > > On Nov 6, 2013, at 1:45 PM, Tim Northover <t.p.northover at gmail.com> wrote: > >>> If you also give "-code-model=large" then LLVM won't assume that >>> "addr" is nearby so it'll use a movabsq with a static relocation. >> >> Actually, it seems our own Eli has written rather a good description >> of these code models: >> http://eli.thegreenplace.net/2012/01/03/understanding-the-x64-code-models/. >> >> Well worth the read (the default models he talks about at the top are >> essentially "static"). >> >> Cheers. >> >> Tim. >
Reasonably Related Threads
- [LLVMdev] "-relocation-model=static" does not work in llc compiler ?
- [LLVMdev] "-relocation-model=static" does not work in llc compiler ?
- [LLVMdev] "-relocation-model=static" does not work in llc compiler ?
- [LLVMdev] "-relocation-model=static" does not work in llc compiler ?
- [LLVMdev] Compiling issues: undefined reference to `.Lline_table_start1'