Could not find ".llvm_bc" ELF section
See original GitHub issueI’ve created a docker-machine and installed wllvm and LLVM 6.0. I’ve changed all required flags because the clang is installed as clang-6.0. However, I still receive that error Could not find ".llvm_bc" ELF section when I execute the command extract-bc. I’m not quite sure if I’m missing anything
Here is the configuration of the docker image inside the Dockerfile
# Pull base image.
FROM buildpack-deps:bionic
RUN echo "Build type set to: Release" && \
# Install deps.
apt-get update && \
apt-get install -yqq software-properties-common && \
apt-get update && \
apt-get install -y wget libprotobuf-dev python-protobuf protobuf-compiler && \
apt-get install -y python-pip && \
apt-get install -y python3-pip && \
#apt-get install -y z3 && \
apt-get install -y libz3-dev && \
apt-get install -y llvm-6.0-dev && \
apt-get install llvm-6.0-tool && \
apt-get install -y clang-6.0 && \
apt-get install -y git && \
apt-get install -y cmake && \
apt-get install -y zlib1g-dev && \
apt-get install -y build-essential &&\
apt-get install -y gperf libgoogle-perftools-dev && \
apt-get install -yqq libboost-dev
RUN echo "Install WLLVM" && \
pip3 install -U lit tabulate wllvm
RUN echo "Download google tests" && \
curl -OL https://github.com/google/googletest/archive/release-1.7.0.zip && \
unzip release-1.7.0.zip && \
rm release-1.7.0.zip
RUN echo "Install klee-uclibc" && \
git clone https://github.com/klee/klee-uclibc.git && \
cd klee-uclibc && \
./configure --make-llvm-lib --with-llvm-config=/usr/bin/llvm-config-6.0 && \
make -j2
ADD debloat KLEE
WORKDIR build/KLEE
RUN echo "Buildg KLEE" && \
cmake \
-DENABLE_SOLVER_Z3=ON \
-DENABLE_POSIX_RUNTIME=ON \
-DENABLE_KLEE_UCLIBC=ON \
-DKLEE_UCLIBC_PATH=/klee-uclibc \
-DENABLE_UNIT_TESTS=ON \
-DGTEST_SRC_DIR=../../googletest-release-1.7.0 \
-DLLVM_CONFIG_BINARY=/usr/bin/llvm-config-6.0 \
-DLLVMCC=/usr/bin/clang-6.0 \
-DLLVMCXX=/usr/bin/clang++-6.0 \
/KLEE && \
make && \
make install
ENV LLVM_CC_NAME clang-6.0
ENV LLVM_CXX_NAME clang++-6.0
ENV LLVM_LINK_NAME llvm-link-6.0
ENV LLVM_AR_NAME llvm-ar-6.0
ENV LLVM_COMPILER clang
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Extracting LLVM bitcode embedded using `-lto-embed-bitcode`
I'm then able to use readelf -S | grep llvmbc to verify that the section exists. It does. Superb! I'd now like to...
Read more >extract-bc problems with shared objects · Issue #71 - GitHub
I fail with this message: WARNING:Could not find ".llvm_bc" ELF section in "/home/oren/GIT/klee/str.klee/klee/benchmarks/libtiff_bitcode/build/ ...
Read more >[llvm-dev] End-to-end -fembed-bitcode .llvmbc and .llvmcmd
The .llvmbc / .llvmcmd section does not have the SHF_EXCLUDE flag. It will be retained in the linked image. >> So maybe the...
Read more >[LTO] Support for embedding bitcode section during LTO
... llvm-readelf -S %t3.0 | FileCheck %s --implicit-check-not=.llvmbc ... +; RUN: llvm-objcopy -O binary -j .llvmbc %t3.0 %t-embedded.bc +; ...
Read more >Arm Compiler User Guide Version 6.11
It does not support bitcode objects coming from libraries. armlink gives an ... This ELF object file contains sections and symbols just like...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

P.S. If you want to save time use gllvm, not wllvm.
@Mohannadcse the binaries do not contain the bitcode. They only contain the (absolute) paths to the bitcode. You move the binaries, but leave the bitcode behind…