Commit: MSP430: Update linker scripts
Nick Clifton
nickc@redhat.com
Thu May 26 10:43:00 GMT 2016
Hi Guys,
A recent change to gcc to make it use the built in MSP430 linker
script if no explicit script is requested has revealed a small
problem. The built in scripts do not define the __bssstart or
__bsssize symbols needed by crt0.o. So I am checking in the patch
below to fix this.
Cheers
Nick
ld/ChangeLog
2016-05-26 Nick Clifton <nickc@redhat.com>
PR target/20134
* scripttempl/elf32msp430.sc (.bss): Provide __bssstart and
__bsssize.
* scripttempl/elf32msp430_3.sc (.bss): Likewise.
diff --git a/ld/scripttempl/elf32msp430.sc b/ld/scripttempl/elf32msp430.sc
index 17bcb36..dda82ff 100644
--- a/ld/scripttempl/elf32msp430.sc
+++ b/ld/scripttempl/elf32msp430.sc
@@ -274,7 +274,8 @@ SECTIONS
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{
${RELOCATING+. = ALIGN(2);}
- ${RELOCATING+ PROVIDE (__bss_start = .) ; }
+ ${RELOCATING+ PROVIDE (__bss_start = .); }
+ ${RELOCATING+ PROVIDE (__bssstart = .); }
*(.lower.bss.* .lower.bss)
${RELOCATING+. = ALIGN(2);}
*(.bss)
@@ -282,6 +283,7 @@ SECTIONS
*(COMMON)
${RELOCATING+ PROVIDE (__bss_end = .) ; }
} ${RELOCATING+ > data}
+ ${RELOCATING+ PROVIDE (__bsssize = SIZEOF(.bss)); }
.noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} :
{
diff --git a/ld/scripttempl/elf32msp430_3.sc b/ld/scripttempl/elf32msp430_3.sc
index 6c4ac15..1e1a68f 100644
--- a/ld/scripttempl/elf32msp430_3.sc
+++ b/ld/scripttempl/elf32msp430_3.sc
@@ -154,10 +154,12 @@ SECTIONS
{
${RELOCATING+. = ALIGN(2);}
${RELOCATING+ PROVIDE (__bss_start = .) ; }
+ ${RELOCATING+ PROVIDE (__bssstart = .); }
*(.bss)
*(COMMON)
${RELOCATING+ PROVIDE (__bss_end = .) ; }
} ${RELOCATING+ > data}
+ ${RELOCATING+ PROVIDE (__bsssize = SIZEOF(.bss)); }
.noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} :
{
More information about the Binutils
mailing list