All linker scripts: Preface all _edata defininitions with . = ALIGN(4). Otherwise, the last bytes in the .data section may not be initialized properly. Also convert all linker scripts indent in units of 8-spaces to units of 4-spaces.

This commit is contained in:
Gregory Nutt
2019-09-15 17:22:16 -06:00
parent 0bd60c3722
commit 2925c28f8f
304 changed files with 3653 additions and 3258 deletions
@@ -37,56 +37,59 @@ OUTPUT_ARCH(sh)
OUTPUT_ARCH(sh)
ENTRY(_stext)
SECTIONS
{
/* The us7032evb1 has CMON in PROM beginning at address 0x00000000 and
* either 64Kb or 256Kb of SRAM beginning at 0x0a000000. Neither the
* PROM nor the first 8Kb of SRAM are avaible to the devoleper as these
* are used by CMON. The next 1Kb of SRAM is dedicated to relocated
* interrupt vectors.
{
/* The us7032evb1 has CMON in PROM beginning at address 0x00000000 and
* either 64Kb or 256Kb of SRAM beginning at 0x0a000000. Neither the
* PROM nor the first 8Kb of SRAM are avaible to the devoleper as these
* are used by CMON. The next 1Kb of SRAM is dedicated to relocated
* interrupt vectors.
*/
. = 0x0a002000;
.text : {
_svect = ABSOLUTE(.);
*(.vects); /* Relocated interrupt vectors */
_evect = ABSOLUTE(.);
_stext = ABSOLUTE(.);
*(.reset) /* Reset/IRQ code */
*(.text) /* Code */
*(.fixup)
*(.gnu.warning)
*(.rodata) /* Read-only data */
*(.rodata.str1.4)
*(.glue_7)
*(.glue_7t)
*(.got) /* Global offset table */
_etext = ABSOLUTE(.);
. = 0x0a002000;
.text : {
_svect = ABSOLUTE(.);
*(.vects); /* Relocated interrupt vectors */
_evect = ABSOLUTE(.);
_stext = ABSOLUTE(.);
*(.reset) /* Reset/IRQ code */
*(.text) /* Code */
*(.fixup)
*(.gnu.warning)
*(.rodata) /* Read-only data */
*(.rodata.str1.4)
*(.glue_7)
*(.glue_7t)
*(.got) /* Global offset table */
_etext = ABSOLUTE(.);
}
.data : ALIGN(4) {
_sdata = ABSOLUTE(.);
*(.data) /* Modifiable data */
CONSTRUCTORS
_edata = ABSOLUTE(.);
.data : ALIGN(4) {
_sdata = ABSOLUTE(.);
*(.data) /* Modifiable data */
CONSTRUCTORS
. = ALIGN(4);
_edata = ABSOLUTE(.);
}
.bss : ALIGN(4) { /* BSS */
_sbss = ABSOLUTE(.);
*(.bss)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.bss : ALIGN(4) { /* BSS */
_sbss = ABSOLUTE(.);
*(.bss)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
@@ -66,6 +66,7 @@ SECTIONS
_sdata = ABSOLUTE(.);
*(.data) /* Modifiable data */
CONSTRUCTORS
. = ALIGN(4);
_edata = ABSOLUTE(.);
}