Skip to content

Commit

Permalink
chips/samd21: Make linker script compatible with Picolibc 1.8
Browse files Browse the repository at this point in the history
Picolibc 1.8 initialization code requires TLS alignment values
computed by the linker script.

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Dec 24, 2022
1 parent a2c4716 commit 395eabd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chips/samd21/snek-samd21.ld
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ SECTIONS {
} >ram AT>ram :tls :ram
PROVIDE(__tbss_size = SIZEOF(.tbss));
PROVIDE(__tls_size = __tls_end - __tls_base);
PROVIDE( __tls_align = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)) );
PROVIDE( __arm32_tls_tcb_offset = MAX(8, __tls_align) );
PROVIDE( __arm64_tls_tcb_offset = MAX(16, __tls_align) );

/*
* The linker special cases .tbss segments which are
Expand Down

0 comments on commit 395eabd

Please sign in to comment.