parent
16efd6a025
commit
83e44bbec3
|
@ -120,6 +120,8 @@ modules:
|
|||
extract:
|
||||
|
||||
- # The symbol name to extract.
|
||||
# To disambiguate local symbols with the same name, use:
|
||||
# `SomeSymbol!.section:0x80001234`
|
||||
symbol: SomeSymbol
|
||||
|
||||
# (optional) The path to extract raw binary data to.
|
||||
|
@ -130,3 +132,26 @@ extract:
|
|||
# In a C/C++ file, the symbol can be included with `#include "Lib/SomeSymbol.inc"`.
|
||||
# Path is relative to `build/GAMEID/include`.
|
||||
header: Lib/SomeSymbol.inc
|
||||
|
||||
# (optional) Block relocations from or to specific addresses.
|
||||
# For modules, this goes in the module's configuration above.
|
||||
block_relocations:
|
||||
|
||||
# Block any relocation pointing _to_ this address.
|
||||
- target: .data:0x80130140
|
||||
|
||||
# Block any relocation originating _from_ this address.
|
||||
- source: .text:0x80047160
|
||||
# (optional) End address to make it a range.
|
||||
end: .text:0x800471A8
|
||||
|
||||
# (optional) Add or replace relocations if they were detected incorrectly.
|
||||
# For modules, this goes in the module's configuration above.
|
||||
add_relocations:
|
||||
|
||||
# From: `subi r3, r3, 0x7657`
|
||||
# To: `li r3, mesWInsert-0x1@sda21`
|
||||
- source: .text:0x800473F4
|
||||
type: sda21
|
||||
target: mesWInsert # Supports `symbol` or `symbol!.section:0x80001234`
|
||||
addend: -1
|
||||
|
|
|
@ -27,10 +27,23 @@ path/to/file.cpp: [file attributes]
|
|||
### File attributes
|
||||
|
||||
- `comment:` Overrides the `mw_comment_version` setting in [`config.yml`](/config/GAMEID/config.example.yml) for this file. See [Comment section](comment_section.md).
|
||||
- `comment:0` is used to disable `.comment` section generation for a file that wasn't compiled with `mwcc`.
|
||||
Example: `TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.s: comment:0`
|
||||
This file was assembled and only contains label symbols. Generating a `.comment` section for it will crash `mwld`.
|
||||
|
||||
`comment:0` is used to disable `.comment` section generation for a file that wasn't compiled with `mwcc`.
|
||||
Example: `TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.s: comment:0`
|
||||
This file was assembled and only contains label symbols. Generating a `.comment` section for it will crash `mwld`.
|
||||
- `order:` Allows influencing the resolved link order of objects. This is **not required**, as decomp-toolkit will generate the link order automatically. This can be used to fine-tune the link order for ambiguous cases.
|
||||
Example:
|
||||
```
|
||||
file1.cpp: order:0
|
||||
...
|
||||
|
||||
file2.cpp: order:1
|
||||
...
|
||||
|
||||
file3.cpp: order:2
|
||||
...
|
||||
```
|
||||
This ensures that `file2.cpp` is always anchored in between 1 and 3 when resolving the final link order.
|
||||
|
||||
### Section attributes
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ All attributes are optional, and are separated by spaces.
|
|||
- `size:` The size of the symbol.
|
||||
- `scope:` The symbol's visibility. `global` (default), `local` or `weak`.
|
||||
- `align:` The symbol's alignment.
|
||||
- `data:` The data type used when writing disassembly. `byte`, `2byte`, `4byte`, `8byte`, `float`, `double`, `string`, `wstring`, `string_table`, or `wstring_table`.
|
||||
- `data:` The data type used when writing disassembly. `byte`, `2byte`, `4byte`, `8byte`, `float`, `double`, `int`, `short`, `string`, `wstring`, `string_table`, or `wstring_table`.
|
||||
- `hidden` Marked as "hidden" in the generated object. (Only used for extab)
|
||||
- `force_active` Marked as ["exported"](comment_section.md) in the generated object, and added to `FORCEACTIVE` in the generated `ldscript.lcf`. Prevents the symbol from being deadstripped.
|
||||
- `noreloc` Prevents the _contents_ of the symbol from being interpreted as addresses. Used for objects containing data that look like pointers, but aren't.
|
||||
|
|
Loading…
Reference in New Issue