Displaying 20 results from an estimated 900 matches similar to: "[LLVMdev] ORC and relocations"
2015 Jun 26
2
[LLVMdev] ORC and relocations
Hi Lang,
Can you please let me know you think it would be right to modify RuntimeDyldImpl::resolveExternalSymbols to allow resolvers to return 0 addresses? Something like this would be ideal for me:
void RuntimeDyldImpl::resolveExternalSymbols() {
while (!ExternalSymbolRelocations.empty()) {
StringMap<RelocationList>::iterator i = ExternalSymbolRelocations.begin();
StringRef
2015 Jun 30
2
[LLVMdev] ORC and relocations
Hi Lang,
Yes, I can return a non-zero marker value. Are you ok with this version?
void RuntimeDyldImpl::resolveExternalSymbols() {
while (!ExternalSymbolRelocations.empty()) {
StringMap<RelocationList>::iterator i = ExternalSymbolRelocations.begin();
StringRef Name = i->first();
if (Name.size() == 0) {
// This is an absolute symbol, use an address of zero.
2015 Jul 23
2
[LLVMdev] ORC and relocations
Hi Lang,
It turns out I also need an ability to tell the object linking layer not to apply any relocations. I need to skip this step below.
The only way I can see I can achieve that is by creating my own ObjectLinkingLayer that would duplicate almost all of orc::ObjectLinkingLayer.
I’d like to avoid that. An alternative it to pass a flag to orc::ObjectLinkingLayer constructor and
2015 Jul 23
2
[LLVMdev] ORC and relocations
Yes, I’m handling all internal and external relocations manually in NotifyLoadedFtor and I already verified that I get the behavior I need if I comment out the call to resolveRelocations.
I would like to reuse ObjectLinkingLayer::addObjectSet (which eventually calls RuntimeDyld::loadObject), which has the right calls to the memory manager and also RuntimeDyld::registerEHFrames.
I understand that
2015 Jul 23
0
[LLVMdev] ORC and relocations
Hi Eugene,
Skipping the call to resolveRelocations would disable many (if not all)
internal relocations too. Is that the desired behavior?
At that point there's not much left for RuntimeDyld (or the
ObjectLinkingLayer) to do. Would something like a NoopLinkingLayer be a
workable solution?
Cheers,
Lang.
On Wed, Jul 22, 2015 at 7:26 PM, Eugene Rozenfeld <
Eugene.Rozenfeld at
2015 Jul 24
0
[LLVMdev] ORC and relocations
Hi Eugene,
Sorry for the delayed reply. Custom relocations weren't something I had in
mind when I designed Orc, so they raise some interesting design questions
which I don't have good answers to yet. (E.g. The interface for the Orc
layer concept assumes that there's a RuntimeDyld instance embedded at the
bottom of the stack. That's why addModuleSet takes a MemoryManager and
2015 Nov 23
2
COFF::IMAGE_REL_AMD64_REL32 relocation overflow when compiling for x86_64
Some time ago I posted here regarding a relocation overflow on Windows
(among other things), but the issue disappeared and so the thread got left.
I've started this new thread because a) I didn't want to necro the old one
and b) it felt like its own.
I've now encountered the issue again and am noting down all the information
I can get about it whilst it's happening.
The issues is
2015 Jan 26
2
[LLVMdev] [llvm] r188726 - Adding PIC support for ELF on x86_64 platforms
Hi Lang,
Yeah, I remember this case. Basically what’s happening is that there are relocations for ELF on x86 that use a value that is present in the object image as part of the calculation for the final value that goes in the same location. If you ever find yourself applying relocations for a second time (for instance, because the loaded object location is remapped for out-of-proc execution)
2015 Nov 23
3
COFF::IMAGE_REL_AMD64_REL32 relocation overflow when compiling for x86_64
Thanks Andy, helpful as always!
1 is a possibility, but not ideal for us.
Could you elaborate a little on 3? I don't really know what a jump stub is,
but am guessing it's a kind of "alternative symbol" which would just act as
a middle man to invoke the "real" symbol in the static library.
If that's the case, I can think of a way to implement it for specific
2015 Jan 22
2
[LLVMdev] MCJIT and recursive finalization
Hi,
I ran into a problem migrating cling (finally!) to MCJIT: When an
("outer") MCJIT's finalization /
llvm::RuntimeDyldImpl::resolveExternalSymbols() is called and a symbol
is not known, cling can help by loading the suitable library and
providing the symbol.
It compiles the relevant C++ header as part of loading the library. This
compilation emits symbols through the MCJIT. That
2013 Sep 22
2
[LLVMdev] Bad permissions for mapped region
Hi List,
I'm trying to upgrade our llvm-c based compiler from JIT to MCJIT.
While trying to do so I encountered several problems. Looks like C
API does not have proper functions to intialize LLVM with MCJIT.
I ended up wrapping the following functions in my own init routine.
LLVMInitializeX86TargetInfo();
LLVMInitializeX86Target();
LLVMInitializeX86TargetMC();
LLVMInitializeX86AsmPrinter();
2016 Apr 29
3
(Orc)JIT and weak symbol resolution
Hi,
This is a question on how to resolve weak symbols from the binary for
symbols that are also llvm::Module-local. Currently, the JIT seems to
favor resolving to module-local symbols over existing symbols:
$ cat symbols.cxx
extern "C" int printf(const char*,...);
template <class T> struct StaticStuff {
static T s_data;
};
template <class T> T
2013 Sep 22
0
[LLVMdev] Bad permissions for mapped region
I managed to make it work by cloning code from lli and making my own cpp
wrapper.
2013/9/22 Konstantin Olkhovskiy <lupus at oxnull.net>
> Hi List,
>
> I'm trying to upgrade our llvm-c based compiler from JIT to MCJIT.
> While trying to do so I encountered several problems. Looks like C
> API does not have proper functions to intialize LLVM with MCJIT.
> I ended up
2017 Aug 24
1
Invalid Signature of orc::RTDyldObjectLinkingLayer::NotifyLoadedFtor
Hi all, hi Lang
It's a little late to report issues for release_50, but I just found
that thing while porting my JitFromScratch examples to 5.0.
This is a really nifty detail, but (if I'm not mistaken) the function
signature of RTDyldObjectLinkingLayer::NotifyLoadedFtor is incorrect:
$ grep -h -r -A 1 "using NotifyLoadedFtor"
2013 Feb 16
2
[LLVMdev] MCJIT and Lazy Compilation
Hey Andy,
Yep I've tested some non-trivial examples with loads of dependencies,
both code and data, global, local and external symbol resolution etc..
Actually this was truly a piece of cake, nothing to do, the memory manager
is working really nicely so far as I can tell. Relocations to sections are
all working
as expected (aside from previously mentioned ARM issue which is probably
just
2015 Jun 04
2
[LLVMdev] MCJit interface question
When we were using MCJIT, I could do this:
// Attach the event listener
Context.EE->RegisterJITEventListener(
LLILCJitEventListener::createLLILCJitEventListener(
new LLILCJitEventWrapper(&Context)));
The event listeners listened for when an object is emitted (NotifyObjectEmitted), and that’s when we’d go through and extract debug info from the ObjectFile. Now, I imagine
2015 Jul 23
2
[LLVMdev] LoadedObjectInfo::getSectionLoadAddress
Hi Lang,
LoadedObjectInfo::getSectionLoadAddress takes StringRef as an arg. That breaks if the object file has multiple sections with the same name. I made a change to add an overload that takes a SectionRef&. Can you please take a look?
https://github.com/erozenfeld/llvm/commit/65f635e426bdc8e80a29ed370a78f0c0a282f265
Thanks,
Eugene
-------------- next part --------------
An HTML
2013 Mar 09
0
[LLVMdev] MCJIT and Lazy Compilation
Hi Andy/Albert,
Sorry for the slow reply, my day job caught up with me.
Two bits of progress. (a) MCJIT is working nicely for non-trivial
examples in Extempore on x86 and ARM, and (b) the page
permissions are now RO again. For your amusement a *very*
cheesy video of Extempore running on-the-fly with MCJIT on an
ARM Pandaboard. Viewer discretion is advised!
https://vimeo.com/60407237
Here is the
2015 Jul 23
0
[LLVMdev] LoadedObjectInfo::getSectionLoadAddress
On Wed, Jul 22, 2015 at 9:41 PM, Eugene Rozenfeld
<Eugene.Rozenfeld at microsoft.com> wrote:
> Hi Lang,
>
>
>
> LoadedObjectInfo::getSectionLoadAddress takes StringRef as an arg. That
> breaks if the object file has multiple sections with the same name. I made a
> change to add an overload that takes a SectionRef&. Can you please take a
> look?
>
>
>
2016 Jul 07
2
ObjectCache and getFunctionAddress issue
Hi all,
I'm trying to add pre-compiled object cache to my run-time.
I've implemented the object cache as follow:
class EngineObjectCache : public llvm::ObjectCache {
private:
std::unordered_map<std::string, std::unique_ptr<llvm::MemoryBuffer>>
CachedObjs;
public:
virtual void notifyObjectCompiled(const llvm::Module *M,
llvm::MemoryBufferRef Obj) {
auto id =