[llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp X86Subtarget.h X86TargetMachine.cpp

Anton Korobeynikov asl at math.spbu.ru
Wed Dec 20 02:31:29 PST 2006


Hello, Chris.

> PPC64 has a similar problem.  It wants to do codegen in PIC mode, but  
> it doesn't want the JIT to make dyld stubs.  As such, it does 'JIT  
> PIC' mode, which is like PIC but doesn't do the extra load to go  
> through dyld stubs.

Yes, It's quite the same. At codegen level we know only addres of import
table entry, which will be filled by system loader with correct address
of symbol. Thus, we need to perform extra load in order to get this
address runtime.
When we get address of symbol during JIT via libSystem we know *exact*
address, so, we don't need any extra load. So, in general, dllimported
GVs are just ordinary externals in JIT mode.

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.





More information about the llvm-commits mailing list