diff --git a/release/outdir/elfconv.sh b/release/outdir/elfconv.sh index 89cf4ba..091feb2 100755 --- a/release/outdir/elfconv.sh +++ b/release/outdir/elfconv.sh @@ -95,6 +95,7 @@ main() { esac echo -e "[${GREEN}INFO${NC}] Converting ELF to LLVM bitcode ..." + export LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ./bin/elflift \ --arch aarch64 \ --bc_out ${OUT}/lift.bc \ diff --git a/release/release.sh b/release/release.sh index edb391f..607b57d 100755 --- a/release/release.sh +++ b/release/release.sh @@ -88,6 +88,16 @@ main() { exit 1 fi + while IFS= read -r so_path; do + if [[ -n "${so_path}" && -f "${so_path}" ]]; then + cp -L "${so_path}" "${LIBDIR}/" + echo -e "[${GREEN}INFO${NC}] Bundled $(basename ${so_path})." + fi + done < <(ldd "${BUILD_DIR}/lifter/elflift" \ + | grep -vE 'linux-vdso|ld-linux|libc\.so|libm\.so|libgcc_s|libstdc\+\+|libpthread|libdl\.so|librt\.so' \ + | awk '{print $3}' \ + | grep -v '^$') + # set semantics *.bc file mkdir -p $BITCODEDIR case "${ARCH_LABEL}" in