Wii: Load Nintendo SDK ELFs via the HBC

The Homebrew Channel (HBC) was designed to be used with the Homebrew  SDK aka devkitPro. So any files you compile with devkitPro should load OK via the HBC.

If you try to load a file that was compiled with the Nintendo SDK however you will get an error that “This is not a valid Wii application”.  This is because the Homebrew Channel retrieves the load addresses for each ELF program segment from the Physical Address field, and in Nintendo SDK files this field is set to zero.

Hopefully the HBC guys will fix this in the next release, making the HBC more compatible. In the meantime you can use this little tool I made to patch your ELF file. It copies the values from the Virtual Address field into the Physical Address field for each program segment in your ELF file.

WiiElfFix v1.0