search for: createbinary

Displaying 20 results from an estimated 21 matches for "createbinary".

2015 Aug 17
4
Aggregate load/stores
...1a And as can be seen here -O0 produces "no passes": https://github.com/Leporacanthicus/lacsap/blob/master/lacsap.cpp#L76 ../lacsap -no-memcpy -tt longcompile.pas -O0 Time for Parse 0.502 ms Time for Analyse 0.015 ms Time for Compile 1.038 ms Time for CreateObject 48134.541 ms Time for CreateBinary 48179.720 ms Time for Compile 48187.351 ms And before someone says "but you are running a debug build", if I run the "production", it does speed things up quite nicely, about 3x, but still takes 17 seconds vs 45ms with that build of the compiler. ../lacsap -no-memcpy -tt long...
2020 Aug 13
2
Adding sections in a binary
Hey, LLVM has logic to parse ELF and PE binaries using `llvm::object::createBinary`. I tried to search in the codebase to see if there's a possibility to add/remove sections after parsing a binary and re-write the binary to another location. Basically, like what llvm-objcopy does. Can you point me to the right classes to look into, if this is something that LLVM has? Many th...
2015 Jul 15
2
[LLVMdev] SymbolRef and getSize
.... It occurs when I used the getSize function from the SymbolRef class. On iOS, the number returned is not always correct (some function have the right size). Sadly, This is my code (at the end of the main function into driver.cpp) : #### ErrorOr<OwningBinary<Binary>> BinaryOrErr = createBinary(file); if (std::error_code ec = BinaryOrErr.getError()) { return ec.value(); } Binary &Binary = *BinaryOrErr.get().getBinary(); object::ObjectFile *objfile; objfile = dyn_cast<ObjectFile>(&Binary); for (const SymbolRef &Symbol : objfile->symbols()) { uint64_t size; Symbo...
2015 Aug 17
5
Aggregate load/stores
...s capable of doing more than 1 line per second, and it didn't run anywhere near 2.5GHz and had 20-30 users anytime I could use it...] ../lacsap -no-memcpy -tt longcompile.pas Time for Parse 0.657 ms Time for Analyse 0.018 ms Time for Compile 1.248 ms Time for CreateObject 48803.263 ms Time for CreateBinary 48847.631 ms Time for Compile 48854.064 ms compared with: ../lacsap -tt longcompile.pas Time for Parse 0.455 ms Time for Analyse 0.013 ms Time for Compile 1.138 ms Time for CreateObject 44.627 ms Time for CreateBinary 82.758 ms Time for Compile 95.797 ms wc longcompile.pas 37 84 410 longcompile...
2020 Jan 14
2
llvm-symbolizer memory usage
...ecause we get things like function inlining that we can't get from cheaper symbolizers), but for large binaries, the memory usage gets pretty huge. Based on some memory profiling, it looks like the majority of this memory cost comes from mmap-ing the binary to be symbolized (via `llvm::object::createBinary"). This alone comes with hundreds of MB of cost in many cases. I have 2 questions here: 1) Does it seem feasible to make llvm-symbolizer work *without* loading the full binary into memory (perhaps just reading sections from disk as needed, at the cost of some extra CPU)? 2) If we figured this...
2020 Aug 13
2
Adding sections in a binary
...m-objcopy source code (llvm/tools/llvm-objcopy) is >probably a good place to start. > >On Thu, Aug 13, 2020 at 8:11 AM Joseph via llvm-dev ><llvm-dev at lists.llvm.org> wrote: >> >> Hey, >> >> LLVM has logic to parse ELF and PE binaries using `llvm::object::createBinary`. I tried to search in the codebase to see if there's a possibility to add/remove sections after parsing a binary and re-write the binary to another location. Basically, like what llvm-objcopy does. Can you point me to the right classes to look into, if this is something that LLVM has? >>...
2014 Jul 22
2
[LLVMdev] How to get the symbols from a .so file?
    Hello all,     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
2017 Jul 27
2
Test Error Paths for Expected & ErrorOr
...cate missing unit tests or insufficient test data. In contrast to unit tests, however, it can also verify correct handling of errors passed between function call hierarchies in more complex scenarios. For this I should point to the other example in the code, where it's applied to llvm::object::createBinary(): https://github.com/weliveindetail/ForceAllErrors-in-LLVM/blob/master/test/TestLLVMObject.h#L13 Here it detects and runs 44 different control paths, that can hardly be covered by a unit test altogether, because they don't depend on the input to creatBinary() but rather on the environment the...
2017 Jul 28
3
Test Error Paths for Expected & ErrorOr
...t;> >> In contrast to unit tests, however, it can also verify correct handling >> of errors passed between function call hierarchies in more complex >> scenarios. >> For this I should point to the other example in the code, where it's >> applied to llvm::object::createBinary(): >> https://github.com/weliveindetail/ForceAllErrors- >> in-LLVM/blob/master/test/TestLLVMObject.h#L13 >> >> Here it detects and runs 44 different control paths, that can hardly be >> covered by a unit test altogether, because they don't depend on the input >&...
2017 Jul 31
2
Test Error Paths for Expected & ErrorOr
...In contrast to unit tests, however, it can also verify correct handling >>> of errors passed between function call hierarchies in more complex >>> scenarios. >>> For this I should point to the other example in the code, where it's >>> applied to llvm::object::createBinary(): >>> >>> https://github.com/weliveindetail/ForceAllErrors-in-LLVM/blob/master/test/TestLLVMObject.h#L13 >>> >>> Here it detects and runs 44 different control paths, that can hardly be >>> covered by a unit test altogether, because they don't depend...
2015 Aug 17
3
Aggregate load/stores
2015-08-17 11:26 GMT-07:00 Mehdi Amini <mehdi.amini at apple.com>: > Hi, > > On Aug 17, 2015, at 12:13 AM, deadal nix via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > 2015-08-16 23:21 GMT-07:00 David Majnemer <david.majnemer at gmail.com>: > >> >> >> Because a solution which doesn't generalize is not a very powerful
2016 Feb 03
13
[RFC] Error handling in LLVM libraries.
...ped_error.patch - 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> --------------...
2017 Jul 27
2
Test Error Paths for Expected & ErrorOr
Hello, this is a call for feedback: opinions, improvements, testers.. I use the support classes Expected<T> and ErrorOr<T> quite often recently and I like the concept a lot! Thanks Lang btw! However, from time to time I found issues in the execution paths of my error cases and got annoyed by their naturally low test coverage. So I started sketching a test that runs all error paths
2012 Jan 23
0
[LLVMdev] ELFObjectFile changes, llvm-objdump showing 'wrong' values?
Hi, I would like to examine the implications you mention in more detail. (1) Symbol address According to the ELF standard, in a symbol table entry st_value means: "In relocatable files, st_value holds a section offset for a defined symbol. That is, st_value is an offset from the beginning of the section that st_shndx identifies." (*) Therefore, when queried about a symbol's
2012 Jan 23
1
[LLVMdev] ELFObjectFile changes, llvm-objdump showing 'wrong' values?
...nking ELFObjectFile was suitable for use on non-relocatable files such as executables. Since this appears to be wrong (it gives the wrong results for such files as detailed above, and probably others), and because this is by design not mistake, might I suggest something similar to updating Binary::createBinary (in lib/Object/Binary.cpp) to reflect this to avoid future confusion (as it presently uses ELFObjectFile for all ELF file types, not just relocatables). I don't know how the correct person to bug about this, hopefully addressing llvmdev@ is sufficient here. Thank you for your time Eli, your d...
2012 Jan 23
3
[LLVMdev] ELFObjectFile changes, llvm-objdump showing 'wrong' values?
Hi all, I'm using the MC framework for a project, and while updating to latest trunk (r148672) encountered the following issue: It seems that SymbolRef::getAddress and SymbolRef::getFileOffset have been changed to add the symbol's offset to the offset of the containing section? This has the following implications: To get the /actual/ fileoffset, I now need to do: Symbol.getFileOffset()
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...vm/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. > > <typed_error.patch><error_demo.tgz> > <thread_typederror_through_object_creation.patch> > _______________________________________________ > LLVM Dev...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...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. >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailm...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...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> >>> _____________...
2016 Feb 03
6
[RFC] Error handling in LLVM libraries.
...o 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> >> _____________________________________...