search for: createobjectfil

Displaying 19 results from an estimated 19 matches for "createobjectfil".

Did you mean: createobjectfile
2014 Jul 22
2
[LLVMdev] How to get the symbols from a .so file?
...    I develop a project based on Clang where I need to read all symbols from a library. For symbols libraries (.a/.lib) I use the following code:     auto &FM = C->getFileManager();     ...     auto Buffer = FM.getBufferForFile(FileEntry);     ...     auto Object = llvm::object::ObjectFile::createObjectFile(Buffer);     This code crashes at the last line if the file in question is a shared object (.so). Apparently I need to use different code to parse a shared object but I have little idea what. Any help will be appreciated.     Thank you for your time,     Dimitar Dobrev -------------- next part -...
2013 Sep 19
2
[LLVMdev] llvm-ar does not generates symbol table for contained bitcode files
...l table no longer contains symbols contained within bitcode modules in the archive. This behavior appears to have been changed with revision 184083 when the internal implementation of llvm-ar was changed from lib/Archive/Archive.cpp to lib/object/Archive.cpp. This seems to occur because ObjectFile::createObjectFile() does not support creating objects of bitcode type and thus llvm-ar cannot read them to retrieve the symbol information. Is there a plan to add support back to llvm-ar to generate symbol table information when archiving bitcode files? Thanks, Jason Steps to reproduce: Create repro.c with the...
2013 Sep 30
0
[LLVMdev] llvm-ar does not generates symbol table for contained bitcode files
...ntains symbols contained within bitcode modules in the > archive. This behavior appears to have been changed with revision 184083 > when the internal implementation of llvm-ar was changed from > lib/Archive/Archive.cpp to lib/object/Archive.cpp. This seems to occur > because ObjectFile::createObjectFile() does not support creating objects of > bitcode type and thus llvm-ar cannot read them to retrieve the symbol > information. > > Is there a plan to add support back to llvm-ar to generate symbol table > information when archiving bitcode files? Yes. I am sorry for the current stat...
2016 Jul 07
2
ObjectCache and getFunctionAddress issue
...loaded and no error was reported by ( MCJIT::generateCodeForModule(Module *M)): // Load the object into the dynamic linker. // MCJIT now owns the ObjectImage pointer (via its LoadedObjects list). ErrorOr<std::unique_ptr<object::ObjectFile>> LoadedObject = object::ObjectFile::createObjectFile(ObjectToLoad->getMemBufferRef()); std::unique_ptr<RuntimeDyld::LoadedObjectInfo> L = Dyld.loadObject(*LoadedObject.get()); if (Dyld.hasError()) report_fatal_error(Dyld.getErrorString()); after the generateCodeForModule call, the findExistingSymbol is invoked. For some reaso...
2017 Aug 29
3
how to auto-report LLVM bugs found by fuzzing?
...llvm::StringMapImpl::LookupBucketFor std::pair<llvm::StringMapIterator<unsigned int>, bool> llvm::StringMap<unsigned llvm::DWARFContext::create Crash Type: Heap-buffer-overflow READ 4 Crash Address: 0x60300000011c Crash State: llvm::identify_magic llvm::object::ObjectFile::createObjectFile _start clang-fuzzer: https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=label%3AProj-llvm+clang-fuzzer&colspec=ID+Type+Component+Status+Proj+Reported+Owner+Summary&cells=ids Crash Type: Stack-buffer-overflow READ 1 Crash Address: 0x7f79e7b71760 Crash State: clang::Lexer::Ski...
2017 Jul 06
2
ErrorInfo::message() possibly broken in LLVM-4.0.1
Hello, I have the following snippet of code that causes valgrind to freak out over unitialized bytes. llvm::Expected<llvm::object::OwningBinary<llvm::object::ObjectFile>> e = llvm::object::ObjectFile::createObjectFile(llvm::StringRef(fname)); if (!e) { llvm::handleAllErrors(e.takeError(), [](const llvm::ErrorInfo<llvm::ECError> &EI) { std::cerr << EI.message() << std::endl; }); return 1; } Am I doi...
2016 Nov 17
3
DWARF Generator
...W_FORM_data1, 4); DwarfGenDIE ArgcDie = SubprogramDie.addChild(DW_TAG_formal_parameter); ArgcDie.addAttribute(DW_AT_name, DW_FORM_strp, "argc"); //ArgcDie.addAttribute(DW_AT_type, DW_FORM_ref_addr, IntDie); // Crashes here... DG.generate(); auto Obj = object::ObjectFile::createObjectFile(Path); if (Obj) { DWARFContextInMemory DwarfContext(*Obj.get().getBinary()); uint32_t NumCUs = DwarfContext.getNumCompileUnits(); for (uint32_t i=0; i<NumCUs; ++i) { DWARFCompileUnit *U = DwarfContext.getCompileUnitAtIndex(i); if (U) U->getUnitDIE(fal...
2016 Feb 03
13
[RFC] Error handling in LLVM libraries.
...h - Adds include/llvm/Support/TypedError.h (also adds anchor() method to lib/Support/ErrorHandling.cpp). error_demo.tgz - Stand-alone program demo'ing basic use of the TypedError API. libobject_typed_error_demo.patch - Threads TypedError through the binary-file creation methods (createBinary, createObjectFile, etc). Proof-of-concept for how TypedError can be integrated into an existing system. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160202/d9a1ecba/attachment-0001.html> -------------- next part -------...
2016 Nov 18
4
DWARF Generator
...DIE ArgcDie = SubprogramDie.addChild(DW_TAG_formal_parameter); > ArgcDie.addAttribute(DW_AT_name, DW_FORM_strp, "argc"); > //ArgcDie.addAttribute(DW_AT_type, DW_FORM_ref_addr, IntDie); // Crashes here... > > DG.generate(); > > auto Obj = object::ObjectFile::createObjectFile(Path); > if (Obj) { > DWARFContextInMemory DwarfContext(*Obj.get().getBinary()); > uint32_t NumCUs = DwarfContext.getNumCompileUnits(); > for (uint32_t i=0; i<NumCUs; ++i) { > DWARFCompileUnit *U = DwarfContext.getCompileUnitAtIndex(i); > if (U)...
2012 Nov 06
2
[LLVMdev] [PATCH] basic reading reloc visitor for x86_64 ELF
...port/system_error.h" #include <algorithm> #include <cstring> +#include <list> +#include <string> + using namespace llvm; using namespace object; @@ -67,6 +71,7 @@ static void DumpInput(const StringRef &Filename) { OwningPtr<ObjectFile> Obj(ObjectFile::createObjectFile(Buff.take())); StringRef DebugInfoSection; + RelocAddrMap RelocMap; StringRef DebugAbbrevSection; StringRef DebugLineSection; StringRef DebugArangesSection; @@ -97,6 +102,57 @@ static void DumpInput(const StringRef &Filename) { DebugStringSection = data; else if (nam...
2016 Nov 18
2
DWARF Generator
...rameter); >>> ArgcDie.addAttribute(DW_AT_name, DW_FORM_strp, "argc"); >>> //ArgcDie.addAttribute(DW_AT_type, DW_FORM_ref_addr, IntDie); // >> Crashes here... >>> >>> DG.generate(); >>> >>> auto Obj = object::ObjectFile::createObjectFile(Path); >>> if (Obj) { >>> DWARFContextInMemory DwarfContext(*Obj.get().getBinary()); >>> uint32_t NumCUs = DwarfContext.getNumCompileUnits(); >>> for (uint32_t i=0; i<NumCUs; ++i) { >>> DWARFCompileUnit *U = DwarfContext.getCompil...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...edError.h (also adds > anchor() method to lib/Support/ErrorHandling.cpp). > > error_demo.tgz - Stand-alone program demo'ing basic use of the TypedError > API. > > libobject_typed_error_demo.patch - Threads TypedError through the > binary-file creation methods (createBinary, createObjectFile, etc). > Proof-of-concept for how TypedError can be integrated into an existing > system. > > <typed_error.patch><error_demo.tgz> > <thread_typederror_through_object_creation.patch> > _______________________________________________ > LLVM Developers mailing l...
2017 Aug 29
2
how to auto-report LLVM bugs found by fuzzing?
...t;unsigned int>, bool> > > llvm::StringMap<unsigned > > llvm::DWARFContext::create > > > > Crash Type: Heap-buffer-overflow READ 4 > > Crash Address: 0x60300000011c > > Crash State: > > llvm::identify_magic > > llvm::object::ObjectFile::createObjectFile > > _start > > > > clang-fuzzer: > > https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q= > label%3AProj-llvm+clang-fuzzer&colspec=ID+Type+Component+Status+Proj+ > Reported+Owner+Summary&cells=ids > > Crash Type: Stack-buffer-overflow READ 1 &...
2016 Nov 18
2
DWARF Generator
...cDie.addAttribute(DW_AT_name, DW_FORM_strp, "argc"); > >>> //ArgcDie.addAttribute(DW_AT_type, DW_FORM_ref_addr, IntDie); // > >> Crashes here... > >>> > >>> DG.generate(); > >>> > >>> auto Obj = object::ObjectFile::createObjectFile(Path); > >>> if (Obj) { > >>> DWARFContextInMemory DwarfContext(*Obj.get().getBinary()); > >>> uint32_t NumCUs = DwarfContext.getNumCompileUnits(); > >>> for (uint32_t i=0; i<NumCUs; ++i) { > >>> DWARFCompileUnit *U...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...rror.h (also adds anchor() method to lib/Support/ErrorHandling.cpp). >> >> error_demo.tgz - Stand-alone program demo'ing basic use of the TypedError API. >> >> libobject_typed_error_demo.patch - Threads TypedError through the binary-file creation methods (createBinary, createObjectFile, etc). Proof-of-concept for how TypedError can be integrated into an existing system. >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-...
2012 Nov 06
0
[LLVMdev] [PATCH] basic reading reloc visitor for x86_64 ELF
On Mon, Nov 5, 2012 at 5:17 PM, Eric Christopher <echristo at gmail.com> wrote: > For llvm-dwarfdump we need to handle relocations inside the debug info > sections in order to successfully dump the dwarf info including strings. > Nick sent out a partial patch that did this not too long ago and I've taken > it and gone in a bit of a different direction, but kept the same basic
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
.../Support/ErrorHandling.cpp). >>> >>> error_demo.tgz - Stand-alone program demo'ing basic use of the >>> TypedError API. >>> >>> libobject_typed_error_demo.patch - Threads TypedError through the >>> binary-file creation methods (createBinary, createObjectFile, etc). >>> Proof-of-concept for how TypedError can be integrated into an existing >>> system. >>> >>> <typed_error.patch><error_demo.tgz> >>> <thread_typederror_through_object_creation.patch> >>> ______________________________...
2016 Feb 03
6
[RFC] Error handling in LLVM libraries.
...; anchor() method to lib/Support/ErrorHandling.cpp). >> >> error_demo.tgz - Stand-alone program demo'ing basic use of the TypedError >> API. >> >> libobject_typed_error_demo.patch - Threads TypedError through the >> binary-file creation methods (createBinary, createObjectFile, etc). >> Proof-of-concept for how TypedError can be integrated into an existing >> system. >> >> <typed_error.patch><error_demo.tgz> >> <thread_typederror_through_object_creation.patch> >> _______________________________________________ >&g...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...pp). >>>> >>>> error_demo.tgz - Stand-alone program demo'ing basic use of the >>>> TypedError API. >>>> >>>> libobject_typed_error_demo.patch - Threads TypedError through the >>>> binary-file creation methods (createBinary, createObjectFile, etc). >>>> Proof-of-concept for how TypedError can be integrated into an existing >>>> system. >>>> >>>> <typed_error.patch><error_demo.tgz> >>>> <thread_typederror_through_object_creation.patch> >>>> ______...