OpenOrbis / OpenOrbis-PS4-Toolchain

The OpenOrbis PS4 custom toolchain. Allows developers to build homebrew for the PS4 without the official SDK.
GNU General Public License v3.0
476 stars 89 forks source link

bad section offset #241

Closed georgemoralis closed 1 year ago

georgemoralis commented 1 year ago

I noticed when i load an eboot.bin (for example hello world sample) the sh offset is wrong . I am not sure where that value comes from but it's surely wrong or i am missing something

ident ............: 0x7F454C46 ident class.......: ELF_CLASS_64 ident data .......: ELF_DATA_2LSB ident version.....: ELF_VERSION_CURRENT ident osabi .....: ELF_OSABI_FREEBSD ident abiversion..: ELF_ABI_VERSION_AMDGPU_HSA_V2 ident UNK ........: 0x000000000000 type ............: ET_SCE_DYNEXEC machine ..........: EM_X86_64 version ..........: EV_CURRENT entry ............: 0x0000000000000020 phoff ............: 0x0000000000000040 shoff ............: 0x00000000001aa4e8 flags ............: 0x00000000 ehsize ...........: 64 phentsize ........: 56 phnum ............: 9 shentsize ........: 64 shnum ............: 49 shstrndx .........: 47

ultimaweapon commented 1 year ago

AFAIK the PS4 is ignored that field.

georgemoralis commented 1 year ago

it is present in debug versions of sdk demos and in OpenOrbis-PS4-Toolchain but probablly not in commercial games

kiwidoggie commented 1 year ago

@ultimaweapon is correct, only program headers are used in the case of the PS4. I believe we can close this issue, if there is anything else that comes up feel free to reply to have it reopened. I usually set those offsets to 0 in my dumped eboots as well so it will load properly in a ELF loader.