-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add list of symbol assignments (a.k.a. undefined_syms) to the generat…
…ed linker script Closes #59
- Loading branch information
1 parent
535fc89
commit 7b63389
Showing
20 changed files
with
1,694 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Symbols assignments | ||
|
||
A "symbol assignment" entry describes extra symbol assignments to define on the | ||
generated linker script. | ||
|
||
These are usually used for defining "undefined symbols", but this system also | ||
allows for more complex expressions. | ||
|
||
Symbols defined in this way do not have a corresponding elf section assigned to | ||
them, in other words they look like `*ABS*` symbols on the linked elf. | ||
|
||
Every attribute listed is optional unless explicitly stated. | ||
|
||
## Table of contents | ||
|
||
- [Symbols assignments](#symbols-assignments) | ||
- [Table of contents](#table-of-contents) | ||
- [`name`](#name) | ||
- [Example](#example) | ||
- [Valid values](#valid-values) | ||
- [`value`](#value) | ||
- [Example](#example-1) | ||
- [Valid values](#valid-values-1) | ||
- [`include_if_any`, `include_if_all`, `exclude_if_any` and `exclude_if_all`](#include_if_any-include_if_all-exclude_if_any-and-exclude_if_all) | ||
|
||
## `name` | ||
|
||
This field is **required**. | ||
|
||
The name of the corresponding symbol to be declared. | ||
|
||
### Example | ||
|
||
```yaml | ||
symbol_assignments: | ||
- name: osMemSize | ||
value: 0x80000318 | ||
``` | ||
### Valid values | ||
Non empty string. | ||
TODO: Impose rules for valid names? | ||
## `value` | ||
|
||
This field is **required**. | ||
|
||
The value or expression to assign to this symbol. | ||
|
||
Usually raw addresses are used as values for a given symbol, but more complex | ||
expressions are allowed too. | ||
See the GNU LD documentation for [Expressions in Linker Scripts](https://sourceware.org/binutils/docs/ld/Expressions.html) | ||
for documentation on what is allowed on those expressions. | ||
|
||
### Example | ||
|
||
```yaml | ||
symbol_assignments: | ||
- name: _gp | ||
value: boot_SCOMMON_START + 0x7FF0 | ||
``` | ||
|
||
### Valid values | ||
|
||
Non empty string. | ||
|
||
## `include_if_any`, `include_if_all`, `exclude_if_any` and `exclude_if_all` | ||
|
||
These fields allow to conditionally include or exclude a given segment depending | ||
on the current [custom options](custom_options.md). | ||
|
||
Their syntax is the same as their [`file`](file.md#include_if_any) counterparts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.