Skip to content

Commit

Permalink
Save a few bytes of flash by aligning BSS data.
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra committed Jun 21, 2015
1 parent 7db6267 commit 5dee96c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/main/target/stm32_flash_f103_128k.ld
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH
Expand All @@ -110,7 +109,7 @@ SECTIONS
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)

. = ALIGN(4);
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/stm32_flash_f103_128k_opbl.ld
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ SECTIONS
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)

. = ALIGN(4);
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/stm32_flash_f103_256k.ld
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ SECTIONS
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)

. = ALIGN(4);
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/stm32_flash_f103_64k.ld
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ SECTIONS
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)

. = ALIGN(4);
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/stm32_flash_f303_128k.ld
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ SECTIONS
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)

. = ALIGN(4);
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/stm32_flash_f303_256k.ld
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ SECTIONS
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)

. = ALIGN(4);
Expand Down

0 comments on commit 5dee96c

Please sign in to comment.