-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark
EXCEPTIONS
and INTERRUPTS
as EXTERN
in the linker script
This is required because otherwise the linker finishes as soon as all unresolved symbols are found. If it stumbles upon one of them by accident (because it looked at the file to find other symbols), the symbol is kept. If not, it is discarded. The `EXTERN` declaration tells the linker that it should look for the passed symbol. This also explains why our workaround worked: If the EXCEPTIONS static is alone in a separate module, it wasn't found because the linker didn't look at the module file to find other symbols. For more details, see rust-lang/rust#40289 (comment)
- Loading branch information
Showing
3 changed files
with
2 additions
and
7 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
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 |
---|---|---|
|
@@ -5,6 +5,8 @@ MEMORY | |
} | ||
|
||
ENTRY(reset) | ||
EXTERN(EXCEPTIONS); | ||
EXTERN(INTERRUPTS); | ||
|
||
__DATA_LOAD = LOADADDR(.data); | ||
|
||
|