[LLVMdev] "-relocation-model=static" does not work in llc compiler ?

lipengcheng pli at cs.rochester.edu
Wed Nov 6 10:57:21 PST 2013


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.
> 





More information about the llvm-dev mailing list