https://github.com/xigh/llvmbc-dump
Simple tool extracts LLVM bitcode modules from ELF binaries compiled with "-fembed-bitcode"
https://github.com/xigh/llvmbc-dump
c elf llvm llvm-bitcode
Last synced: 24 days ago
JSON representation
Simple tool extracts LLVM bitcode modules from ELF binaries compiled with "-fembed-bitcode"
- Host: GitHub
- URL: https://github.com/xigh/llvmbc-dump
- Owner: xigh
- License: bsd-2-clause
- Created: 2019-02-16T16:21:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-01T14:58:08.000Z (about 7 years ago)
- Last Synced: 2025-04-15T08:40:26.166Z (11 months ago)
- Topics: c, elf, llvm, llvm-bitcode
- Language: C
- Size: 1.81 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# llvmbc dump
Simple tool that extracts LLVM bitcode modules from ELF binaries compiled with "-fembed-bitcode".
## Compile
mkdir build
cd build
cmake ..
make
## Usage
> src/llvmbc-dump tests/src/test
```text
[xigh@bsd64 ~/src/llvmbc-dump/build]$ ./src/llvmbc-dump tests/src/test
file size: 32144
module: /home/xigh/src/llvmbc-dump/tests/src/main.c / x86_64-unknown-freebsd12.0 / e-m:e-i64:64-f80:128-n8:16:32:64-S128
F: main: i32 (i32, i8**)*
D: foo: i32 (...)*
D: bar: i32 (...)*
module: /home/xigh/src/llvmbc-dump/tests/lib/foo.c / x86_64-unknown-freebsd12.0 / e-m:e-i64:64-f80:128-n8:16:32:64-S128
F: foo: i32 ()*
module: /home/xigh/src/llvmbc-dump/tests/lib/bar.c / x86_64-unknown-freebsd12.0 / e-m:e-i64:64-f80:128-n8:16:32:64-S128
F: bar: i32 ()*
```
## TODO
* Test it on bigger projects
* finish analyzeFn
## Copyright
BSD