search for: resolveexternalsymbols

Displaying 12 results from an estimated 12 matches for "resolveexternalsymbols".

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 "inner" MCJIT'ing then needs to finalize to resol...
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 Name = i->firs...
2015 Jun 24
3
[LLVMdev] ORC and relocations
...e client is via NotifyLoadedFtor notifications but I couldn't find a way of blocking a relocation resolution. One way to achieve that is to change the Resolver::findSymbol api to allow clients to indicate that the relocations for the symbol shouldn't be resolved and update RuntimeDyldImpl::resolveExternalSymbols accordingly. Would this be a reasonable approach? Thanks, Eugene -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150624/4c4e0f4c/attachment.html>
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. DEBUG(dbgs() << "Res...
2016 Apr 29
3
(Orc)JIT and weak symbol resolution
...ces. That's the behavior I'd expect. The JIT OTOH is deciding that it shall use the local version of the symbol; RuntimeDyld::getSymbol() doesn't care about the fact that the symbol is weak and has an existing occurrence. For weak symbols from a different module, RuntimeDyld would use resolveExternalSymbols() and all would be good - but here this doesn't happen. IIUC, RuntimeDyld::getSymbol() really needs to check whether the local symbol should survive or not, before handing out its address. But that seems to break the whole design of when relocs happen, so I'm sure I'm wrong. Can I get...
2015 Jul 23
2
[LLVMdev] ORC and relocations
...make it testable) in r241383. Cheers, Lang. On Mon, Jun 29, 2015 at 7:31 PM, Eugene Rozenfeld <Eugene.Rozenfeld at microsoft.com<mailto:Eugene.Rozenfeld at microsoft.com>> wrote: 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. DEBUG(dbgs() << "Res...
2015 Jul 23
0
[LLVMdev] ORC and relocations
...rs, > > Lang. > > > > On Mon, Jun 29, 2015 at 7:31 PM, Eugene Rozenfeld < > Eugene.Rozenfeld at microsoft.com> wrote: > > 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 symb...
2015 Jul 23
2
[LLVMdev] ORC and relocations
...make it testable) in r241383. Cheers, Lang. On Mon, Jun 29, 2015 at 7:31 PM, Eugene Rozenfeld <Eugene.Rozenfeld at microsoft.com<mailto:Eugene.Rozenfeld at microsoft.com>> wrote: 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. DEBUG(dbgs() << "Res...
2015 Nov 23
2
COFF::IMAGE_REL_AMD64_REL32 relocation overflow when compiling for x86_64
...9 C llvm::RuntimeDyldCOFFX86_64::resolveRelocation(const llvm::RelocationEntry & RE, unsigned __int64 Value) Line 81 C++ llvm::RuntimeDyldImpl::resolveRelocationList(const llvm::SmallVector<llvm::RelocationEntry,64> & Relocs, unsigned __int64 Value) Line 796 C++ llvm::RuntimeDyldImpl::resolveExternalSymbols() Line 849 C++ llvm::RuntimeDyldImpl::resolveRelocations() Line 95 C++ llvm::RuntimeDyld::resolveRelocations() Line 961 C++ llvm::orc::ObjectLinkingLayer<llvm::orc::DoNothingOnNotifyLoaded>::ConcreteLinkedObjectSet<std::shared_ptr<llvm::SectionMemoryManager>,ClangClasses::LLVMExecuti...
2015 Jul 24
0
[LLVMdev] ORC and relocations
...rs, > > Lang. > > > > On Mon, Jun 29, 2015 at 7:31 PM, Eugene Rozenfeld < > Eugene.Rozenfeld at microsoft.com> wrote: > > 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 symb...
2015 Nov 23
3
COFF::IMAGE_REL_AMD64_REL32 relocation overflow when compiling for x86_64
...st llvm::RelocationEntry > & RE, unsigned __int64 Value) Line 81 C++ > > llvm::RuntimeDyldImpl::resolveRelocationList(const > llvm::SmallVector<llvm::RelocationEntry,64> & Relocs, unsigned __int64 > Value) Line 796 C++ > > llvm::RuntimeDyldImpl::resolveExternalSymbols() Line 849 C++ > > llvm::RuntimeDyldImpl::resolveRelocations() Line 95 C++ > > llvm::RuntimeDyld::resolveRelocations() Line 961 C++ > > llvm::orc::ObjectLinkingLayer<llvm::orc::DoNothingOnNotifyLoaded>::ConcreteLinkedObjectSet<std::shared_ptr<llv...
2015 Jan 26
2
[LLVMdev] [llvm] r188726 - Adding PIC support for ELF on x86_64 platforms
...n 44; else if (Arch == Triple::x86_64) - return 8; // GOT + return 6; // 2-byte jmp instruction + 32-bit relative address else if (Arch == Triple::systemz) return 16; else @@ -292,6 +302,11 @@ protected: /// \brief Resolve relocations to external symbols. void resolveExternalSymbols(); + + /// \brief Update GOT entries for external symbols. + // The base class does nothing. ELF overrides this. + virtual void updateGOTEntries(StringRef Name, uint64_t Addr) {} + virtual ObjectImage *createObjectImage(ObjectBuffer *InputBuffer); public: RuntimeDyldImpl(RTDyldMemoryMana...