[LLVMdev] implementing PIC for linux x86-64
Anton Korobeynikov
asl at math.spbu.ru
Fri May 30 10:20:01 PDT 2008
Hello, Rafael
> On linux X86_64, calls to local but externally visible functions
> should use the PLT. Access to local (same compilation unit), variables
> can just use RIP relative access.
Right, this is just optimization. AFAIR, current code already does this
for 'normal' PIC - it just checks for linkage and doesn't assemble call
via PLT for stuff with internal linkage.
> Looks like we need a second variable (say PICCallStyle). With it we
> would have something like:
This seems to be PIC vs Dynamic-No-PIC relocation style issue, I don't
see, why something new is needed here.
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.
More information about the llvm-dev
mailing list