Skip to content

Commit

Permalink
Add empty .data section enforcer in loader scripts for all targets
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeutin-ledger committed Jul 11, 2023
1 parent ee03223 commit 2f69653
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions target/nanos2/script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ SECTIONS

} > DISCARD /*> SRAM AT>FLASH = 0x00 */

ASSERT( (_edata - _data) <= 0, ".data section must be empty" )

.bss :
{
/**
Expand Down
2 changes: 2 additions & 0 deletions target/nanox/script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ SECTIONS

} > DISCARD /*> SRAM AT>FLASH = 0x00 */

ASSERT( (_edata - _data) <= 0, ".data section must be empty" )

/* The .init_array is initialized with functions with the constructor
* attribute. Discard this section since there's no loader. */
/DISCARD/ : {
Expand Down
2 changes: 2 additions & 0 deletions target/stax/script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ SECTIONS

} > DISCARD /*> SRAM AT>FLASH = 0x00 */

ASSERT( (_edata - _data) <= 0, ".data section must be empty" )

.bss :
{
/**
Expand Down

0 comments on commit 2f69653

Please sign in to comment.