Merge pull request #1007 from antmicro/fix-demo-alignments

Fix alignments in demo/linker.ld
This commit is contained in:
enjoy-digital 2021-08-23 16:12:23 +02:00 committed by GitHub
commit 767bf81c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 5 deletions

View File

@ -10,33 +10,41 @@ SECTIONS
.text : .text :
{ {
_ftext = .; _ftext = .;
/* Make sure crt0 files come first, and they, and the isr */
/* don't get disposed of by greedy optimisation */
*crt0*(.text)
KEEP(*crt0*(.text))
KEEP(*(.text.isr))
*(.text .stub .text.* .gnu.linkonce.t.*) *(.text .stub .text.* .gnu.linkonce.t.*)
_etext = .; _etext = .;
} > main_ram } > main_ram
.rodata : .rodata :
{ {
. = ALIGN(4); . = ALIGN(8);
_frodata = .; _frodata = .;
*(.rodata .rodata.* .gnu.linkonce.r.*) *(.rodata .rodata.* .gnu.linkonce.r.*)
*(.rodata1) *(.rodata1)
. = ALIGN(8);
_erodata = .; _erodata = .;
} > main_ram } > main_ram
.data : .data :
{ {
. = ALIGN(4); . = ALIGN(8);
_fdata = .; _fdata = .;
*(.data .data.* .gnu.linkonce.d.*) *(.data .data.* .gnu.linkonce.d.*)
*(.data1) *(.data1)
_gp = ALIGN(16); _gp = ALIGN(16);
*(.sdata .sdata.* .gnu.linkonce.s.*) *(.sdata .sdata.* .gnu.linkonce.s.*)
. = ALIGN(8);
_edata = .; _edata = .;
} > main_ram } > main_ram
.bss : .bss :
{ {
. = ALIGN(4); . = ALIGN(8);
_fbss = .; _fbss = .;
*(.dynsbss) *(.dynsbss)
*(.sbss .sbss.* .gnu.linkonce.sb.*) *(.sbss .sbss.* .gnu.linkonce.sb.*)
@ -44,13 +52,13 @@ SECTIONS
*(.dynbss) *(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*) *(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON) *(COMMON)
. = ALIGN(4); . = ALIGN(8);
_ebss = .; _ebss = .;
_end = .; _end = .;
} > sram } > sram
} }
PROVIDE(_fstack = ORIGIN(sram) + LENGTH(sram) - 4); PROVIDE(_fstack = ORIGIN(sram) + LENGTH(sram));
PROVIDE(_fdata_rom = LOADADDR(.data)); PROVIDE(_fdata_rom = LOADADDR(.data));
PROVIDE(_edata_rom = LOADADDR(.data) + SIZEOF(.data)); PROVIDE(_edata_rom = LOADADDR(.data) + SIZEOF(.data));