similar to: Is it possible to generate a whole kernel bitcode for Linux using clang?

Displaying 20 results from an estimated 9000 matches similar to: "Is it possible to generate a whole kernel bitcode for Linux using clang?"

2016 Jan 06
3
whole linux kernel bitcode
Hi all, I'm trying to generate whole program bitcode files for linux kernel and do interprocedural analysis on kernel. I use llvmlinux to compile kernel with clang and generate a bunch of bitcode files successfully. I need to link all these bitcode files together into a single bitcode file, so that I can run whole program analysis. Should I use libLTO to link all these bitcode files
2018 May 15
2
Four bitcode generated with plugin-opt=save-temps
Hi I use the LDFLAGS=" -flto -fuse-ld=gold -Wl,-plugin-opt=save-temps " to generate the makefile and to make the whole program. However, found four different kinds of bitcode for each target. For example, I am compiling coreutils. For the program "nohup", I can get nohup.0.0.preopt.bc nohup.0.2.internalize.bc nohup.0.4.opt.bc nohup.0.5.precodegen.bc If I am right, I
2018 May 15
0
Four bitcode generated with plugin-opt=save-temps
These are the bitcode at different stages of the LTO portion of the compile. LTO merges the IR for all files being linked and optimizes them as a single monolithic module. The preopt.bc is the merged IR just after merging and before performing any LTO optimizations. internalize.bc is after performing whole program internalization. opt.bc is after the optimization pipeline, and .precodegen.bc is
2018 May 15
1
Four bitcode generated with plugin-opt=save-temps
Hi Teresa Thanks for your very quick and clear explanation. I have one more question. The emit-llvm option will give you the IR for a single source file when you compile it with -c. All of those files when combined give the IR in the preopt.bc temp file. =========== So if I use "clang -emit-llvm -c" to generate the .ll file. It should be the same as the one I generated by using
2015 Apr 09
3
[LLVMdev] [RFC] Setting preserve-bc-use-list-order=true by default
> On 2015-Apr-09, at 11:06, David Blaikie <dblaikie at gmail.com> wrote: > > Late to the party because I figured other people would chime in, but I'll have a go... > > On Tue, Mar 31, 2015 at 7:10 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > A while back I finished up some work [1] that Chad started to preserve > use-list-order in bitcode
2014 Jul 03
5
[LLVMdev] Global constructors "get lost" when transforming bitcode files
Hello, A strange problem appears when upgrading from release_34 to testing. Some transformations to bitcode files cause registered global_ctors to not be called. Here's an example (I've also attached the complete example and pasted it below): This works: clang -fsanitize=address -flto -c -o sum.o sum.c clang -fsanitize=address -o sum sum.o This doesn't work: clang
2015 Mar 18
5
[LLVMdev] Controlling the LTO optimization level
Hi all, I wanted to start a thread to discuss ways to control the optimization level when using LTO. We have found that there are use cases for the LTO mechanism beyond whole-program optimization, in which full optimization is not always needed or desired. We started that discussion over in http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150316/266560.html and I thought I'd
2015 Apr 14
2
[LLVMdev] [RFC] Setting preserve-bc-use-list-order=true by default
> On 2015-Apr-10, at 09:12, David Blaikie <dblaikie at gmail.com> wrote: > > > > On Thu, Apr 9, 2015 at 12:37 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > > > On 2015-Apr-09, at 11:06, David Blaikie <dblaikie at gmail.com> wrote: > > > > Late to the party because I figured other people would chime in, but I'll have a
2016 Jan 05
2
Whole program LLVM bitcode files
Hi all, I'm trying to generate whole program bitcode files for linux kernel and do interprocedural analysis on kernel. I use llvmlinux to compile kernel with clang and generate a bunch of bitcode files successfully. I need to link all these bitcode files together into a single bitcode file, so that I can run whole program analysis. Can I use llvm-link to achieve this? Or should I use
2016 Oct 26
2
archiving LTO objects broken for current Xcode releases
The ability to archive object files generated with -flto under LLVM.org clang 3.9.0 or 4.0svn trunk is broken against the currently shipping Xcode releases including the upcoming Xcode 8.1 GM. https://llvm.org/bugs/show_bug.cgi?id=30791 $ clang-3.9 -flto -O1 -c *.i $ ar cr libtar.a paxerror.o paxexit-status.o paxnames.o rtapelib.o stdopen.o wordsplit.o xattr-at.o error: Unknown attribute kind
2020 Jul 12
2
Emit LLVM bitcode after ThinLTO
Hi, I wanted to get the linked result in LLVM bitcode format. With LTO, this can be done by -flto -Wl,-plugin-opt,emit-llvm. Instead of generating native executables, it outputs a file with bitcode format. Does this still work with -flto=thin? -flto=thin -Wl,-plugin-opt,emit-llvm outputs a bitcode file, but its file size is too small, and does not contain all contents. What is the correct way
2015 May 18
3
[LLVMdev] How to write a custom LTO pass?
I'd like to write an inter-modular analysis pass. My understanding is that this should take the form of an LTO pass. However, I have been unable to find any resources on the mechanics of writing and running a custom LTO pass. Does anyone have any pointers? Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL:
2015 Jun 22
2
[LLVMdev] Enabling the gold linker on freebsd
I have been trying to enable the gold linker on FreeBSD to use the link time optimizations. I made gold from the binutils under /usr/ports. After building binutils using make -k install clean i got ld under /usr/bin and in the directory /usr/local/bin i got ld, ld.gold and ld.bfd. Now while trying to use link time optimization for the simple example programs
2020 Jul 22
2
How to debug a missing symbol with ThinLTO?
Looks like your static library is not even pulled into the link command so the static library is not even in the snapshot. From the link command in the snapshot, the static library is not on the command line from snapshot: /Applications/Xcode-11.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -Z -demangle -object_path_lto
2020 Jul 23
2
How to debug a missing symbol with ThinLTO?
Hi Tobias The problem is that your static archive has a SYMDEF that is empty, so linker thinks the static library provided doesn't contain any symbol. The reason for that is you are using the `ranlib` from Xcode, which is too old to understand the new bitcode object files produced by llvm 10. There are lots of ways to fix that: * The standard way to create static library on macOS is to use
2016 Oct 26
0
archiving LTO objects broken for current Xcode releases
> On Oct 26, 2016, at 8:06 AM, Jack Howarth via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > The ability to archive object files generated with -flto under > LLVM.org clang 3.9.0 or 4.0svn trunk is broken against the currently > shipping Xcode releases including the upcoming Xcode 8.1 GM. > > https://llvm.org/bugs/show_bug.cgi?id=30791 > > $ clang-3.9
2010 Apr 29
3
[LLVMdev] Mach-O LTO and local relocations
I am wondering how the following issue was handled for libLTO? We have a working patch to implement the FSF gcc LTO on darwin which now passes all of the liblto testsuite but are seeing linker issues with larger programs like aermod... as -arch x86_64 -force_cpusubtype_ALL -o aermod.o aermod.s /usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.6.3 -weak_reference_mismatches
2020 Jul 22
2
How to debug a missing symbol with ThinLTO?
This is usually a problem that is not using llvm-ar. I cannot reproduce this problem with either llvm 10.0 or TOT version. Which linker version are you using? You can also try pass "-Wl,-debug_snapshot" to the command where the error produces and then locate the "*.ld-snapshot" in /tmp directory and attach that as a reproducer. Steven > On Jul 22, 2020, at 8:41 AM, Teresa
2011 Mar 24
2
[LLVMdev] Instrumentation with liblto and gold
Hi, I need advice in instrumenting programs using liblto and gold plugin. Specifically, I added my pass in tools/lto/LTOCodeGenerator.cpp. My pass inserts functions (myLoad and myStore) for some load and store instructions. The functions exist in a library file. I found that the approach works for the example in the link: http://llvm.org/docs/GoldPlugin.html $ llvm-gcc -flto a.c -c -o a.o $ ar q
2013 Jun 10
1
[LLVMdev] gcc-4.8.1 -flto, error for visibility of LLVMX86CompilationCallback2?
I tried to compile LLVM with gcc-4.8.1 -flto. I got the following error, when linking lli, llc, opt, or libLTO.so: `LLVMX86CompilationCallback2' referenced in section `.text' of /tmp/cclv7BYB.ltrans0.ltrans.o: defined in discarded section `.text' of X86JITInfo.o (symbol from plugin) collect2: error: ld returned 1 exit status Removing the LLVM_LIBRARY_VISIBILITY attribute for