Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Fix __ebss not being placed after all .bss symbols
Browse files Browse the repository at this point in the history
Additionally, include COMMON symbols (uninitialized statics from C) in bss.
  • Loading branch information
mattico committed Aug 20, 2020
1 parent 2c56bfd commit cd16b20
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions link.x.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,15 @@ SECTIONS
__sidata = LOADADDR(.data);

/* ### .bss */
. = ALIGN(4);
__sbss = .; /* Define outside of section to include INSERT BEFORE/AFTER symbols */
.bss (NOLOAD) : ALIGN(4)
{
. = ALIGN(4);
__sbss = .;
*(.bss .bss.*);
. = ALIGN(4); /* 4-byte align the end (VMA) of this section */
__ebss = .;
*(COMMON); /* Uninitialized C statics */
} > RAM
. = ALIGN(4); /* 4-byte align the end (VMA) of this section */
__ebss = .;

/* ### .uninit */
.uninit (NOLOAD) : ALIGN(4)
Expand Down

0 comments on commit cd16b20

Please sign in to comment.