mirror of
https://codeberg.org/KeybadeBlox/JSRF-Decompilation.git
synced 2026-02-20 02:07:02 +03:00
Compare commits
3 commits
ddc10a878c
...
cef08bf624
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cef08bf624 | ||
|
|
91537e765a | ||
|
|
a8b04d24d5 |
2 changed files with 28 additions and 8 deletions
|
|
@ -17,7 +17,7 @@ main() {
|
|||
set -- $line
|
||||
set +f; IFS=$IFS_PREV
|
||||
|
||||
if [ "$2" == true ]; then # If object is marked for extraction
|
||||
if [ "$2" = true ]; then # If object is marked for extraction
|
||||
object_name=$1
|
||||
printf '\n--- %s ---\n' "$object_name"
|
||||
|
||||
|
|
@ -58,6 +58,12 @@ delink() {
|
|||
else suffix=
|
||||
fi
|
||||
|
||||
# POSIX compatibility layers for Windows (like in git bash) will
|
||||
# interpret arguments like /exporter as filepaths and attempt to
|
||||
# convert them to Windows paths, breaking them; this variable disables
|
||||
# that
|
||||
export MSYS_NO_PATHCONV=1
|
||||
|
||||
"$1/support/analyzeHeadless$suffix" "$2" "$3"\
|
||||
-process default.xbe\
|
||||
-noanalysis\
|
||||
|
|
|
|||
|
|
@ -93,10 +93,10 @@ should be all ready for creating object files for objdiff.
|
|||
|
||||
|
||||
### Producing Object Files
|
||||
Close all of your Ghidra windows and open a shell in the decompilation
|
||||
repository's `delink/` directory. The `delink.sh` script is our automated tool
|
||||
for extracting all the object files that have been identified so far. Invoke
|
||||
it with three arguments:
|
||||
Close all of your Ghidra windows and open a Unix-style shell (e.g. Git Bash if
|
||||
on Windows) in the decompilation repository's `delink/` directory. The
|
||||
`delink.sh` script is our automated tool for extracting all the object files
|
||||
that have been identified so far. Invoke it with three arguments:
|
||||
|
||||
- The path to your Ghidra installation (the directory with files like
|
||||
`ghidraRun` and `ghidraRun.bat`, and directories like `docs/` and
|
||||
|
|
@ -105,13 +105,27 @@ it with three arguments:
|
|||
directory with a name ending in `.rep`)
|
||||
- The name of your JSRF Ghidra project
|
||||
|
||||
There are two common errors you might get here:
|
||||
If you're on Windows, the paths you provide should be Windows filepaths, not
|
||||
Unix-style paths. Make sure the paths are surrounded by quotes, too (e.g.
|
||||
`'C:\path\to\whatever'`), else the shell won't understand the backslashes
|
||||
correctly.
|
||||
|
||||
There are a couple errors you might get here:
|
||||
|
||||
- `Unable to lock project!`: This means that Ghidra isn't fully closed. Make
|
||||
sure you've completely closed every Ghidra window before running `delink.sh`.
|
||||
- `Script not found: DelinkProgram.java` and
|
||||
`Invalid script: DelinkProgram.java`: This means that the Ghidra delinker
|
||||
extension isn't properly installed. Ensure it's installed and enabled first.
|
||||
`Invalid script: DelinkProgram.java`: This means that the either the Ghidra
|
||||
delinker extension isn't properly installed, or you've somehow invoked the
|
||||
script in a way that can't see the extension (e.g. installing Ghidra on
|
||||
Windows and then invoking the script from WSL). Ensure it's installed and
|
||||
enabled first, and that you're not running in some kind of environment
|
||||
different from where you installed Ghidra.
|
||||
- `java.lang.RuntimeException: Failed to export ...`: This means that the
|
||||
delinker extension doesn't like something about what it was told to delink.
|
||||
One known cause is duplicate symbol names. If you haven't modified
|
||||
`objects.csv` or `symboltable.tsv`, let other people on the project know so
|
||||
that they can look into fixing it.
|
||||
|
||||
If all goes well, you'll see the message `Delinking complete!` at the end of
|
||||
the script's output, and the extracted object files will be in the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue