From e55fef36a93badf6c4925ea2455a1ca6b361357e Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Wed, 5 Aug 2009 00:11:21 +0000 Subject: 1) Proper emit displacements for x86, using absolute relocations where necessary for ELF to work. 2) RIP addressing: Use SIB bytes for absolute relocations where RegBase=0, IndexReg=0. 3) The JIT can get the real address of cstpools and jmptables during code emission, fix that for object code emission git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78129 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/ObjectCodeEmitter.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/llvm/CodeGen/ObjectCodeEmitter.h') diff --git a/include/llvm/CodeGen/ObjectCodeEmitter.h b/include/llvm/CodeGen/ObjectCodeEmitter.h index 4ed061609b..8252e07d84 100644 --- a/include/llvm/CodeGen/ObjectCodeEmitter.h +++ b/include/llvm/CodeGen/ObjectCodeEmitter.h @@ -109,6 +109,13 @@ public: /// noted with this interface. void addRelocation(const MachineRelocation& relocation); + /// earlyResolveAddresses - True if the code emitter can use symbol addresses + /// during code emission time. The JIT is capable of doing this because it + /// creates jump tables or constant pools in memory on the fly while the + /// object code emitters rely on a linker to have real addresses and should + /// use relocations instead. + bool earlyResolveAddresses() const { return false; } + /// startFunction - This callback is invoked when the specified function is /// about to be code generated. This initializes the BufferBegin/End/Ptr /// fields. -- cgit v1.2.3