mirror of
https://github.com/ApfelTeeSaft/WiiU_RPL_Loader.git
synced 2026-08-26 19:43:25 +00:00
main
Wii U RPL Loader for IDA 9
A comprehensive IDA Pro 9.0+ loader for Wii U RPL (Relocatable Program Library) files. This loader enables reverse engineering and analysis of Wii U system libraries and homebrew applications.
Features
- Complete RPL Support: Handles all Wii U RPL file formats including system libraries and homebrew
- Automatic Decompression: Supports zlib-compressed sections (SHF_RPL_DEFLATED)
- Symbol Resolution: Loads function names, data objects, imports, and exports
- Relocation Processing: Handles PowerPC and GHS-specific relocation types
- Segment Creation: Properly creates code, data, and BSS segments with correct permissions
- Import/Export Analysis: Automatically resolves dependencies between RPL modules
- PowerPC Configuration: Sets up processor options optimized for Wii U analysis
Requirements
- IDA Pro 9.0 or later
- Windows (tested), Linux, or macOS
- Wii U RPL files (.rpl extension)
Usage
- Launch IDA Pro 9.0+
- Open RPL file:
File→Openand select your.rplfile- Or drag and drop the RPL file onto IDA
- File Format Detection:
- IDA should automatically detect "Wii U RPL" format
- If not detected, manually select "Wii U RPL" from the format dropdown
- Analysis: IDA will automatically:
- Load and decompress all sections
- Create memory segments
- Apply relocations
- Load symbols and create functions
- Set up imports/exports
Supported File Types
- System RPLs: Core Wii U system libraries (coreinit.rpl, gx2.rpl, etc.)
- Game RPLs: Game-specific libraries and modules
- Homebrew RPLs: Community-developed libraries and applications
Technical Details
Supported Features
- ELF Format: Custom Wii U ELF variant with CAFE identifiers
- Compression: zlib/deflate decompression for packed sections
- Relocations: Full PowerPC relocation support including:
R_PPC_ADDR32,R_PPC_ADDR16_LO/HI/HAR_PPC_REL24,R_PPC_DTPREL32- GHS custom relocations (
R_PPC_GHS_REL16_*)
- Sections: Code, data, BSS, imports, exports, and metadata
- Symbols: Functions, objects, and TLS symbols
File Structure
RPL File Structure:
├── ELF Header (CAFE-specific)
├── Section Headers
├── Sections
│ ├── .text (code)
│ ├── .data/.rodata (data)
│ ├── .bss (uninitialized)
│ ├── SHT_RPL_IMPORTS (dependencies)
│ ├── SHT_RPL_EXPORTS (provided symbols)
│ └── SHT_RPL_CRCS (checksums)
└── Symbol/String Tables
Building from Source
Prerequisites
- Visual Studio 2022 (Windows) or appropriate C++ compiler
- IDA Pro 9.0+ SDK
Build Steps
-
Clone Repository:
git clone https://github.com/apfelteesaft/wiiu-rpl-loader.git cd wiiu-rpl-loader -
Set up IDA SDK:
- Download IDA SDK from Hex-Rays
- Extract to
ida-sdk/directory or setIDA_SDK_PATHenvironment variable
-
Build:
Visual Studio:
# Open WiiU_RPL_Loader.sln # Set to Release configuration # Build Solution -
Install:
Release/WiiU_RPL_Loader.dll "C:\Program Files\IDA Professional 9.0\loaders\"
Troubleshooting
Loading Errors
Common issues and solutions:
| Error | Solution |
|---|---|
| "Failed to read ehdr.e_ident" | File may be corrupted or not a valid RPL |
| "Unexpected ehdr.e_ident.osabi" | File is not a Wii U RPL (wrong platform) |
| "Failed to load section data" | File truncated or compression error |
| "Unsupported relocation type" | New relocation type needs implementation |
Known Limitations
- Processor Options: Some PowerPC-specific optimizations are disabled pending IDA 9 API research
- TLS Symbols: Thread-local storage symbols may need manual analysis
- Custom Sections: Some game-specific section types may not be fully supported
Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Test thoroughly with various RPL files
- Submit a pull request
Testing
Test with these RPL types:
- System libraries (coreinit.rpl, gx2.rpl)
- Game modules
- Homebrew applications
- Compressed and uncompressed files
Credits
- Compression: Uses tinfl for zlib decompression
- ELF Parsing: Based on standard ELF specifications with Wii U extensions
References
Changelog
v2.0.0 (IDA 9 Port)
- Updated for IDA 9.0+ compatibility
- Modern C++ standards and APIs
- Improved error handling
- Enhanced debugging output
v1.0.0 (Original)
- Initial IDA 7 implementation
- Basic RPL loading support
- Symbol and relocation processing
Note: This loader is for educational and research purposes. Ensure you have legal rights to analyze any RPL files you process.
Languages
C
57.8%
C++
42.2%