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

Commit

Permalink
Merge #190
Browse files Browse the repository at this point in the history
190: Align sections r=korken89 a=NickeZ

Hey, I had the same issue as in #189. Don't ask me why this works I looked at other linker scripts.

Fixes #189

Co-authored-by: Niklas Claesson <nicke.claesson@gmail.com>
  • Loading branch information
bors[bot] and NickeZ committed Jun 8, 2019
2 parents 9859fa1 + a7b7193 commit 3d4e730
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions link.x.in
Original file line number Diff line number Diff line change
Expand Up @@ -105,31 +105,30 @@ SECTIONS
/* ### .data */
.data : ALIGN(4)
{
. = ALIGN(4);
__sdata = .;
*(.data .data.*);

. = ALIGN(4); /* 4-byte align the end (VMA) of this section */
__edata = .;
} > RAM AT > FLASH

/* VMA of .data */
__sdata = ADDR(.data);
__edata = ADDR(.data) + SIZEOF(.data);

/* LMA of .data */
__sidata = LOADADDR(.data);

/* ### .bss */
.bss : ALIGN(4)
{
. = ALIGN(4);
__sbss = .;
*(.bss .bss.*);

. = ALIGN(4); /* 4-byte align the end (VMA) of this section */
__ebss = .;
} > RAM

__sbss = ADDR(.bss);
__ebss = ADDR(.bss) + SIZEOF(.bss);

/* Place the heap right after `.bss` */
__sheap = ADDR(.bss) + SIZEOF(.bss);
. = ALIGN(4);
__sheap = .;

/* ## .got */
/* Dynamic relocations are unsupported. This section is only used to detect relocatable code in
Expand Down

0 comments on commit 3d4e730

Please sign in to comment.