Comments (9)
Fixed in b827e93
from r2ghidra.
the sleigh files are shipped in a separate zip in the release page. you can build them, but only with make for now
from r2ghidra.
@trufae great thanks. Do you have any pointer how one could build/distribute sleigh files themselves? Its important for us to be able to build them ourselves.
I think right now I figured it like this:
make -C ghidra sleigh-build
export R2_LIBR_PLUGINS=$(r2 -H R2_LIBR_PLUGINS)
DESTDIR="${pkgdir}" make -C ghidra install
from r2ghidra.
yep. thats how you build it if you think it's worth to have the instructions in the readme they can be added. it will be good to be able to build it with meson too, but i dont see it as a prioriy right now
from r2ghidra.
@trufae Sounds good enough for now, thank you! Compared the results to the provided zip and they seem to match. Good enough for now. If its ever moved over to meson please make us somehow aware :D
from r2ghidra.
Yeah the sleigh files are portable. You can generate them once and use them on different systems. The zip in the release page is generated by the ci.
i'll open a ticket to make that part meson friendly when i get bored :)
btw i have a patch installing the sleighc compiler, not sure if you want to package this bonary too. Or maybe in a separate package because that may allow users to build their own custom processors
from r2ghidra.
@trufae nice, good to hear. I've done some first meson adjustments for iaito but wanted to check in on some translations related topics. Can i reach you somewhere or should we discuss that on a bug ticket at iaito
?
from r2ghidra.
Sure, use mail, telegram or discord
from r2ghidra.
workaround for meson in NixOS/nixpkgs#213388
using xargs to run sleighc in parallel
(using a sparse checkout of ghidra, 6 of 240 MB)
{
# workround for https://github.com/radareorg/r2ghidra/issues/93
# https://github.com/radareorg/r2ghidra/blob/master/ghidra/Makefile
postBuild = ''
GHIDRA_SLEIGH_HOME=../ghidra/src/Processors
cp -v ../ghidra-processors.txt.default ../ghidra-processors.txt
echo "Compiling processor files"
./sleighc -a $GHIDRA_SLEIGH_HOME/DATA
cat ../ghidra-processors.txt | sed "s|^|$GHIDRA_SLEIGH_HOME/|" | xargs -n1 -P$NIX_BUILD_CORES ./sleighc -a 2>/dev/null
'';
# TODO use radare2.abiVersion https://github.com/radareorg/radare2/pull/20545
postInstall = ''
echo "Installing processor files to $out/lib/radare2/${radare2.version}/r2ghidra_sleigh"
mkdir $out/lib/radare2/${radare2.version}/r2ghidra_sleigh
for a in DATA $(cat ../ghidra-processors.txt); do
for b in $GHIDRA_SLEIGH_HOME/$a/*/*/*.{cspec,ldefs,pspec,sla}; do
cp $b $out/lib/radare2/${radare2.version}/r2ghidra_sleigh
done
done
'';
for reference ...
https://mesonbuild.com/Custom-build-targets.html
Lines 1 to 14 in 0799403
Lines 111 to 131 in a1495c5
Lines 22 to 23 in 0799403
from r2ghidra.
Related Issues (20)
- Linux build errors v5.7.8 HOT 13
- [Install error] cannot stat 'sleighc': No such file or directory HOT 2
- Build errors HOT 1
- Debian build issues HOT 1
- Allow using system pugixml for build HOT 4
- Another debian packaging improvement
- add the boolean check kwarg to the run_command call HOT 1
- RISC-V on windows HOT 14
- How to install on Kali? HOT 4
- Issues with interface with radare2? HOT 7
- Compilation failure on latest radare2 git pull HOT 2
- SleightInit Non-existent context variable: TMode HOT 2
- Build error HOT 8
- Errors updating on Kali Linux ARM64 (latest version of r2) HOT 1
- ‘R_ARCH_INFO_MIN_OP_SIZE’ was not declared in this scope (Error at ArchMap.cpp:242:14) HOT 4
- Different behavior when opening local vs remote files. HOT 3
- Segmentation fault during decompilation HOT 4
- Is it possible to bring ghidra's plug-in in? HOT 1
- pdg gives not c-style format HOT 4
- Imstallation issue in termux HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r2ghidra.