From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:REL relocatable module" |
|---|
| claim | "REL relocations are 8-byte OSRel records in per-import streams: u16 offset (bytes since the previous record), u8 type, u8 section (section of the imported module; for module 0 the addend is absolute), u32 addend. The import table entries (OSImportInfo) are 8 bytes: u32 module id, u32 offset of the stream." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:REL relocatable module" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "OSRel" |
|---|
| size | 8 |
|---|
| fields | | offset | 0 |
|---|
| size | 2 |
|---|
| type | "u16" |
|---|
| name | "offset" |
|---|
| notes | "delta from the previous record (reset by R_DOLPHIN_SECTION)" |
|---|
|
| offset | 2 |
|---|
| size | 1 |
|---|
| type | "u8" |
|---|
| name | "type" |
|---|
|
| offset | 3 |
|---|
| size | 1 |
|---|
| type | "u8" |
|---|
| name | "section" |
|---|
|
| offset | 4 |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "addend" |
|---|
|
|
|---|
| endianness | "big" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct OSImportInfo {id, offset}; struct OSRel {u16 offset; u8 type; u8 section; u32 addend}" |
|---|
| repo | "https://github.com/zeldaret/tww" |
|---|
| commit | "8b93b372dc8e841f12ddfb7e0215626f62b05417" |
|---|
| path | "include/dolphin/os/OSLink.h" |
|---|
| lines | "84-94" |
|---|
|
| type | "source" |
|---|
| detail | "Relocate: p += rel->offset; target offset = section info of the new module [rel->section] or 0 for the DOL" |
|---|
| repo | "https://github.com/zeldaret/tww" |
|---|
| commit | "8b93b372dc8e841f12ddfb7e0215626f62b05417" |
|---|
| path | "src/dolphin/os/OSLink.c" |
|---|
| lines | "144-153" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "OSRel relocation record" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T18:21:16.777Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T16:38:42.019Z" |
|---|
| summary | "data.endianness big added; relocation types per OSLink.h: 201 NOP (offset += OSRel.offset), 202 SECTION (current section = OSRel.section), 203 END, 204 MRKREF, others are PowerPC relocations." |
|---|
| changed | |
|---|
|
|
|---|