http://llvm.org/bugs/show_bug.cgi?id=15356
Bug ID: 15356
Summary: RuntimeDyldELF doesn't handle >2GB relocations on
x86-64 platforms
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Generic Execution Engine Support
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
On x86-64 platforms, RuntimeDyldELF cannot be guaranteed to handle 32-bit
relative relocations correctly. Although the SectionMemoryManager attempts to
allocate all loaded sections in proximity to one another, this cannot be
guaranteed. Furthermore, RuntimeDyldELF should not be dependent upon the
memory manager's allocation scheme to perform correctly.
The specific relocation in question is R_X86_64_PC32, which is typically used
with a call or jump instruction. It may be possible to solve this problem by
generating a stub within the source section that can bridge the gap to the
target section. However, some investigation is necessary to verify that this
approach will work in all cases.
Note that the assertion in the RuntimeDyldELF handler for the R_X86_64_32 and
R_X86_64_32S relocation types covers a different situation. If that assertion
fires, it is almost certainly because code was generated with the small memory
model and is being loaded above the 2GB boundary. When the small memory model
is used on x86-64 (not recommended), it is the responsible of the client code
to provide a memory manager which guarantees that code will be loaded below the
2GB boundary.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs