[llvm-commits] [llvm] r67142 - in /llvm/trunk: lib/Target/X86/X86Instr64bit.td test/CodeGen/X86/call-imm.ll

Mike Stump mrs at apple.com
Wed Mar 18 07:34:47 PDT 2009


On Mar 18, 2009, at 6:45 AM, Török Edwin wrote:
> libraries are loaded above 2GB here (Debian Linux 2.6.28.7), here is a
> sample /proc/self/maps:

> According to the gcc docs the small code model is the default.
> Maybe I am missing something, but how can this work, even for gcc?

Magic.  If you want to see how it works on your system, compile hello  
world and see what it does.  :-)  On our system the linker knows how  
to insert jumps to jumps and the like to make it work.  http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/1-Articles/x86_64_code.html

> Or does the linker do the neccessary adjustments to the code here?

:-)

> Also code for -mcmodel=kernel will surely not be in first 2Gb.

Yes, it is in the last 2GB of the address space.  Doesn't change  
anything.



More information about the llvm-commits mailing list