GithubHelp home page GithubHelp logo

openorbis / create-fself Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 4.0 78 KB

Golang based tools for taking PC-compatible ELFs and generating fake SELFs that run on the PlayStation 4.

License: GNU General Public License v3.0

Go 98.11% Batchfile 0.79% Shell 0.57% Makefile 0.05% CMake 0.48%

create-fself's People

Contributors

0xcaff avatar ac2pic avatar cryptogenic avatar kiwidoggie avatar nkrapivin avatar sleirsgoevy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-fself's Issues

`create-fself` crashes with SIGSEGV when linking with `--gc-sections --as-needed`

After linking with --gc-sections --as-needed, create-fself crashes with SIGSEGV at OELFGenProgramHeaders.go:116:

FAILED: devilutionx.self /home/gleb/devilutionX/build-ps4/devilutionx.self 
cd /home/gleb/devilutionX/build-ps4 && /usr/bin/cmake -E env OO_PS4_TOOLCHAIN=/opt/pacbrew/ps4/openorbis /opt/pacbrew/ps4/openorbis/bin/create-fself -in=devilutionx -out=devilutionx.oelf --eboot eboot.bin --paid 0x3800000000000035 --authinfo 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4bd64b]

goroutine 1 [running]:
github.com/OpenOrbis/create-fself/pkg/oelf.(*OrbisElf).GenerateProgramHeaders(0xc000185680)
	/home/cpasjuste/dev/pacbrew-packages/ps4-openorbis/create-fself/src/create-fself-30d2e10507f55124cf21e85e19825482e4f93c87/pkg/oelf/OELFGenProgramHeaders.go:116 +0x3ab
main.main()
	/home/cpasjuste/dev/pacbrew-packages/ps4-openorbis/create-fself/src/create-fself-30d2e10507f55124cf21e85e19825482e4f93c87/cmd/create-fself/main.go:94 +0x517
ninja: build stopped: subcommand failed.

The crash happens here:

dataSize := (dataSection.Offset - procParamSection.Offset) + dataSection.Size

More log: https://gist.githubusercontent.com/glebm/49a29bfc641ea3c844cadd08ef18df68/raw/c2ac2268dba8f3c6ec4b69fca7ec4eecf8dbbc33/gistfile1.txt

Add platform specific folder delimiters for additional libraries

The colon as a folder path delimiter breaks support for windows.

libPath := flag.String("library-path", "", "additional directories to search for .so files")

Because of the code below, paths with drive letters can not be passed as an argument.

libDirs := append([]string{sdkPath + "/lib"}, strings.Split(libPath, ":")...)

Failed to build FSELF: missing library for symbol (mxmlDelete)

Hello, I am attempting to create an fself using this utility. However, I am encountering this error:

Failed to build FSELF: missing library for symbol (mxmlDelete)

I'm in a docker ubuntu 222.04 container. I can compile everything from the Goldhen Repository except for game_patch, which gives this error. I have mxml-dev installed, and I've also installed buccaneros fork of mxml to no avail.

Here is the full output of the command with strace:

root@88ea38af7d62:/workspace/GoldHEN_Plugins_Repository/plugin_src/game_patch# strace -e open /lib/OpenOrbisSDK/bin/linux/create-fself -in=/workspace/GoldHEN_Plugins_Repository/plugin_src/game_patch/../../bin/plugins/elf_final/game_patch.elf -out=/workspace/GoldHEN_Plugins_Repository/plugin_src/game_patch/../../bin/plugins/elf_final/game_patch.oelf --lib=/workspace/GoldHEN_Plugins_Repository/plugin_src/game_patch/../../bin/plugins/prx_final/game_patch.prx --paid 0x3800000000000011
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=11927, si_uid=0} ---
Failed to build FSELF: missing library for symbol (mxmlDelete)
+++ exited with 255 +++

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.