From 8325af0defb19a86e9e6b316a10181e323ba9dc0 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Mon, 26 Aug 2019 13:38:21 -0700 Subject: [PATCH 1/3] Bump DeviceTree Tools and Metal Signed-off-by: Nathaniel Graff --- freedom-devicetree-tools | 2 +- freedom-metal | 2 +- wit-manifest.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/freedom-devicetree-tools b/freedom-devicetree-tools index 67f2598d7..3f1b44765 160000 --- a/freedom-devicetree-tools +++ b/freedom-devicetree-tools @@ -1 +1 @@ -Subproject commit 67f2598d7e9c7f2be01c164421bd5ed795d2d9a1 +Subproject commit 3f1b447656684eebd2d0c0c549fb9feff1e000c2 diff --git a/freedom-metal b/freedom-metal index d9361de4a..8a3c9c046 160000 --- a/freedom-metal +++ b/freedom-metal @@ -1 +1 @@ -Subproject commit d9361de4a9dc33997748292abe75a4e1b3d74722 +Subproject commit 8a3c9c04600946f4228b2e7e76c0058dc6388f60 diff --git a/wit-manifest.json b/wit-manifest.json index 72a3fc7fd..3eebf7df5 100644 --- a/wit-manifest.json +++ b/wit-manifest.json @@ -1,11 +1,11 @@ [ { - "commit": "67f2598d7e9c7f2be01c164421bd5ed795d2d9a1", + "commit": "3f1b447656684eebd2d0c0c549fb9feff1e000c2", "name": "freedom-devicetree-tools", "source": "git@github.com:sifive/freedom-devicetree-tools.git" }, { - "commit": "d9361de4a9dc33997748292abe75a4e1b3d74722", + "commit": "8a3c9c04600946f4228b2e7e76c0058dc6388f60", "name": "freedom-metal", "source": "git@github.com:sifive/freedom-metal.git" }, From fafb5a2215071ad70d366e471f887b9ab8de45c3 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Mon, 26 Aug 2019 13:39:37 -0700 Subject: [PATCH 2/3] Regen BSPs Signed-off-by: Nathaniel Graff --- bsp/freedom-e310-arty/metal.default.lds | 61 +++++++----------- bsp/freedom-e310-arty/metal.ramrodata.lds | 61 +++++++----------- bsp/freedom-e310-arty/metal.scratchpad.lds | 61 +++++++----------- bsp/qemu-sifive-e31/metal.default.lds | 61 +++++++----------- bsp/qemu-sifive-e31/metal.ramrodata.lds | 61 +++++++----------- bsp/qemu-sifive-e31/metal.scratchpad.lds | 61 +++++++----------- bsp/qemu-sifive-s51/metal.default.lds | 61 +++++++----------- bsp/qemu-sifive-s51/metal.ramrodata.lds | 61 +++++++----------- bsp/qemu-sifive-s51/metal.scratchpad.lds | 61 +++++++----------- bsp/qemu-sifive-u54/metal.default.lds | 61 +++++++----------- bsp/qemu-sifive-u54/metal.ramrodata.lds | 62 ++++++------------- bsp/qemu-sifive-u54/metal.scratchpad.lds | 61 +++++++----------- bsp/sifive-hifive-unleashed/metal.default.lds | 61 +++++++----------- .../metal.ramrodata.lds | 61 +++++++----------- .../metal.scratchpad.lds | 61 +++++++----------- bsp/sifive-hifive1-revb/metal.default.lds | 61 +++++++----------- bsp/sifive-hifive1-revb/metal.ramrodata.lds | 61 +++++++----------- bsp/sifive-hifive1-revb/metal.scratchpad.lds | 61 +++++++----------- bsp/sifive-hifive1/metal.default.lds | 61 +++++++----------- bsp/sifive-hifive1/metal.ramrodata.lds | 61 +++++++----------- bsp/sifive-hifive1/metal.scratchpad.lds | 61 +++++++----------- 21 files changed, 460 insertions(+), 822 deletions(-) diff --git a/bsp/freedom-e310-arty/metal.default.lds b/bsp/freedom-e310-arty/metal.default.lds index 5a8925153..86acdf14b 100644 --- a/bsp/freedom-e310-arty/metal.default.lds +++ b/bsp/freedom-e310-arty/metal.default.lds @@ -30,10 +30,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -41,10 +48,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -103,35 +106,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -144,27 +128,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/freedom-e310-arty/metal.ramrodata.lds b/bsp/freedom-e310-arty/metal.ramrodata.lds index 4bd8e7c7f..b5656fd17 100644 --- a/bsp/freedom-e310-arty/metal.ramrodata.lds +++ b/bsp/freedom-e310-arty/metal.ramrodata.lds @@ -30,10 +30,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -41,10 +48,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -89,35 +92,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); - - - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -130,27 +114,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/freedom-e310-arty/metal.scratchpad.lds b/bsp/freedom-e310-arty/metal.scratchpad.lds index 78b54a1f2..96259f44f 100644 --- a/bsp/freedom-e310-arty/metal.scratchpad.lds +++ b/bsp/freedom-e310-arty/metal.scratchpad.lds @@ -28,10 +28,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >ram AT>ram :ram + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >ram AT>ram :ram + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -39,10 +46,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >ram AT>ram :ram - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >ram AT>ram :ram - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -101,35 +104,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >ram AT>ram :ram - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>ram :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>ram :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >ram AT>ram :ram - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>ram :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -142,27 +126,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>ram :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-e31/metal.default.lds b/bsp/qemu-sifive-e31/metal.default.lds index 8762a6469..915497452 100644 --- a/bsp/qemu-sifive-e31/metal.default.lds +++ b/bsp/qemu-sifive-e31/metal.default.lds @@ -29,10 +29,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -40,10 +47,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -102,35 +105,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -143,27 +127,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-e31/metal.ramrodata.lds b/bsp/qemu-sifive-e31/metal.ramrodata.lds index 21e43bb8a..977967cad 100644 --- a/bsp/qemu-sifive-e31/metal.ramrodata.lds +++ b/bsp/qemu-sifive-e31/metal.ramrodata.lds @@ -29,10 +29,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -40,10 +47,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -88,35 +91,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); - - - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -129,27 +113,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-e31/metal.scratchpad.lds b/bsp/qemu-sifive-e31/metal.scratchpad.lds index cb6a82630..5745d45ae 100644 --- a/bsp/qemu-sifive-e31/metal.scratchpad.lds +++ b/bsp/qemu-sifive-e31/metal.scratchpad.lds @@ -27,10 +27,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >ram AT>ram :ram + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >ram AT>ram :ram + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -38,10 +45,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >ram AT>ram :ram - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >ram AT>ram :ram - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -100,35 +103,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >ram AT>ram :ram - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>ram :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>ram :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >ram AT>ram :ram - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>ram :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -141,27 +125,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>ram :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-s51/metal.default.lds b/bsp/qemu-sifive-s51/metal.default.lds index 8762a6469..915497452 100644 --- a/bsp/qemu-sifive-s51/metal.default.lds +++ b/bsp/qemu-sifive-s51/metal.default.lds @@ -29,10 +29,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -40,10 +47,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -102,35 +105,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -143,27 +127,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-s51/metal.ramrodata.lds b/bsp/qemu-sifive-s51/metal.ramrodata.lds index 21e43bb8a..977967cad 100644 --- a/bsp/qemu-sifive-s51/metal.ramrodata.lds +++ b/bsp/qemu-sifive-s51/metal.ramrodata.lds @@ -29,10 +29,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -40,10 +47,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -88,35 +91,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); - - - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -129,27 +113,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-s51/metal.scratchpad.lds b/bsp/qemu-sifive-s51/metal.scratchpad.lds index cb6a82630..5745d45ae 100644 --- a/bsp/qemu-sifive-s51/metal.scratchpad.lds +++ b/bsp/qemu-sifive-s51/metal.scratchpad.lds @@ -27,10 +27,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >ram AT>ram :ram + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >ram AT>ram :ram + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -38,10 +45,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >ram AT>ram :ram - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >ram AT>ram :ram - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -100,35 +103,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >ram AT>ram :ram - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>ram :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>ram :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >ram AT>ram :ram - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>ram :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -141,27 +125,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>ram :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-u54/metal.default.lds b/bsp/qemu-sifive-u54/metal.default.lds index 561debb58..412b32b39 100644 --- a/bsp/qemu-sifive-u54/metal.default.lds +++ b/bsp/qemu-sifive-u54/metal.default.lds @@ -29,10 +29,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >rom AT>rom :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >rom AT>rom :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -40,10 +47,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >rom AT>rom :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >rom AT>rom :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -102,35 +105,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >rom AT>rom :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >rom AT>rom :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >rom AT>rom :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >rom AT>rom :flash - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>rom :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -143,27 +127,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>rom :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-u54/metal.ramrodata.lds b/bsp/qemu-sifive-u54/metal.ramrodata.lds index 83dfe93b8..4dfc519d8 100644 --- a/bsp/qemu-sifive-u54/metal.ramrodata.lds +++ b/bsp/qemu-sifive-u54/metal.ramrodata.lds @@ -29,17 +29,11 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >rom AT>rom :flash - .text : { - *(.text.unlikely .text.unlikely.*) - *(.text.startup .text.startup.*) - *(.text .text.*) - *(.gnu.linkonce.t.*) - } >rom AT>rom :flash - .fini : { KEEP (*(SORT_NONE(.fini))) } >rom AT>rom :flash @@ -88,35 +82,20 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >rom AT>rom :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >rom AT>rom :itim_init - - .itim_section : { + .itim : ALIGN(8) { + *(.text.unlikely .text.unlikely.*) + *(.text.startup .text.startup.*) + *(.text .text.*) + *(.gnu.linkonce.t.*) *(.itim .itim.*) } >rom AT>rom :itim_init - PROVIDE( metal_segment_itim_target_end = . ); - - - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >rom AT>rom :flash + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>rom :ram_init - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -129,27 +108,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>rom :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/qemu-sifive-u54/metal.scratchpad.lds b/bsp/qemu-sifive-u54/metal.scratchpad.lds index 1bd40a2a2..45df06d25 100644 --- a/bsp/qemu-sifive-u54/metal.scratchpad.lds +++ b/bsp/qemu-sifive-u54/metal.scratchpad.lds @@ -27,10 +27,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >ram AT>ram :ram + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >ram AT>ram :ram + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -38,10 +45,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >ram AT>ram :ram - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >ram AT>ram :ram - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -100,35 +103,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >ram AT>ram :ram - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>ram :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>ram :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >ram AT>ram :ram - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>ram :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -141,27 +125,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>ram :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive-unleashed/metal.default.lds b/bsp/sifive-hifive-unleashed/metal.default.lds index fa7ba8d78..21d3de309 100644 --- a/bsp/sifive-hifive-unleashed/metal.default.lds +++ b/bsp/sifive-hifive-unleashed/metal.default.lds @@ -30,10 +30,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -41,10 +48,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -103,35 +106,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -144,27 +128,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive-unleashed/metal.ramrodata.lds b/bsp/sifive-hifive-unleashed/metal.ramrodata.lds index 136ba3e1e..4a688901f 100644 --- a/bsp/sifive-hifive-unleashed/metal.ramrodata.lds +++ b/bsp/sifive-hifive-unleashed/metal.ramrodata.lds @@ -30,10 +30,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -41,10 +48,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -89,35 +92,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); - - - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -130,27 +114,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive-unleashed/metal.scratchpad.lds b/bsp/sifive-hifive-unleashed/metal.scratchpad.lds index 6acecfc56..2d927f9df 100644 --- a/bsp/sifive-hifive-unleashed/metal.scratchpad.lds +++ b/bsp/sifive-hifive-unleashed/metal.scratchpad.lds @@ -28,10 +28,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >ram AT>ram :ram + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >ram AT>ram :ram + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -39,10 +46,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >ram AT>ram :ram - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >ram AT>ram :ram - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -101,35 +104,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >ram AT>ram :ram - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>ram :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>ram :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >ram AT>ram :ram - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>ram :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -142,27 +126,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>ram :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive1-revb/metal.default.lds b/bsp/sifive-hifive1-revb/metal.default.lds index 24b207ba3..b72a79aad 100644 --- a/bsp/sifive-hifive1-revb/metal.default.lds +++ b/bsp/sifive-hifive1-revb/metal.default.lds @@ -30,10 +30,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -41,10 +48,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -103,35 +106,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -144,27 +128,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive1-revb/metal.ramrodata.lds b/bsp/sifive-hifive1-revb/metal.ramrodata.lds index 76ec6ea5a..aaad93706 100644 --- a/bsp/sifive-hifive1-revb/metal.ramrodata.lds +++ b/bsp/sifive-hifive1-revb/metal.ramrodata.lds @@ -30,10 +30,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -41,10 +48,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -89,35 +92,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); - - - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -130,27 +114,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive1-revb/metal.scratchpad.lds b/bsp/sifive-hifive1-revb/metal.scratchpad.lds index d557ce7b5..a016205d0 100644 --- a/bsp/sifive-hifive1-revb/metal.scratchpad.lds +++ b/bsp/sifive-hifive1-revb/metal.scratchpad.lds @@ -28,10 +28,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >ram AT>ram :ram + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >ram AT>ram :ram + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -39,10 +46,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >ram AT>ram :ram - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >ram AT>ram :ram - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -101,35 +104,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >ram AT>ram :ram - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >itim AT>ram :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >itim AT>ram :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >ram AT>ram :ram - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>ram :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -142,27 +126,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>ram :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive1/metal.default.lds b/bsp/sifive-hifive1/metal.default.lds index 8762a6469..915497452 100644 --- a/bsp/sifive-hifive1/metal.default.lds +++ b/bsp/sifive-hifive1/metal.default.lds @@ -29,10 +29,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -40,10 +47,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -102,35 +105,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -143,27 +127,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive1/metal.ramrodata.lds b/bsp/sifive-hifive1/metal.ramrodata.lds index 21e43bb8a..977967cad 100644 --- a/bsp/sifive-hifive1/metal.ramrodata.lds +++ b/bsp/sifive-hifive1/metal.ramrodata.lds @@ -29,10 +29,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >flash AT>flash :flash + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash :flash + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -40,10 +47,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >flash AT>flash :flash - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >flash AT>flash :flash - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -88,35 +91,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >flash AT>flash :flash - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>flash :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>flash :itim_init - PROVIDE( metal_segment_itim_target_end = . ); - - - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >flash AT>flash :flash + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>flash :ram_init - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -129,27 +113,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>flash :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); diff --git a/bsp/sifive-hifive1/metal.scratchpad.lds b/bsp/sifive-hifive1/metal.scratchpad.lds index cb6a82630..5745d45ae 100644 --- a/bsp/sifive-hifive1/metal.scratchpad.lds +++ b/bsp/sifive-hifive1/metal.scratchpad.lds @@ -27,10 +27,17 @@ SECTIONS .init : { KEEP (*(.text.metal.init.enter)) + KEEP (*(.text.metal.init.*)) KEEP (*(SORT_NONE(.init))) KEEP (*(.text.libgloss.start)) } >ram AT>ram :ram + .fini : { + KEEP (*(SORT_NONE(.fini))) + } >ram AT>ram :ram + + + .text : { *(.text.unlikely .text.unlikely.*) *(.text.startup .text.startup.*) @@ -38,10 +45,6 @@ SECTIONS *(.gnu.linkonce.t.*) } >ram AT>ram :ram - .fini : { - KEEP (*(SORT_NONE(.fini))) - } >ram AT>ram :ram - PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); @@ -100,35 +103,16 @@ SECTIONS - .litimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_source_start = . ); - } >ram AT>ram :ram - - .ditimalign : { - . = ALIGN(8); - PROVIDE( metal_segment_itim_target_start = . ); - } >ram AT>ram :itim_init - - .itim_section : { + .itim : ALIGN(8) { *(.itim .itim.*) } >ram AT>ram :itim_init - PROVIDE( metal_segment_itim_target_end = . ); + PROVIDE( metal_segment_itim_source_start = LOADADDR(.itim) ); + PROVIDE( metal_segment_itim_target_start = ADDR(.itim) ); + PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) ); - .lalign : { - . = ALIGN(8); - PROVIDE( _data_lma = . ); - PROVIDE( metal_segment_data_source_start = . ); - } >ram AT>ram :ram - - .dalign : { - . = ALIGN(8); - PROVIDE( metal_segment_data_target_start = . ); - } >ram AT>ram :ram_init - - .data : { + .data : ALIGN(8) { *(.data .data.*) *(.gnu.linkonce.d.*) . = ALIGN(8); @@ -141,27 +125,26 @@ SECTIONS *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*) + . = ALIGN(8); + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) } >ram AT>ram :ram_init - PROVIDE( _edata = . ); - PROVIDE( edata = . ); - PROVIDE( metal_segment_data_target_end = . ); + PROVIDE( metal_segment_data_source_start = LOADADDR(.data) ); + PROVIDE( metal_segment_data_target_start = ADDR(.data) ); + PROVIDE( metal_segment_data_target_end = ADDR(.data) + SIZEOF(.data) ); - . = ALIGN(8); - PROVIDE( _fbss = . ); - PROVIDE( __bss_start = . ); - PROVIDE( metal_segment_bss_target_start = . ); - .bss : { + .bss : ALIGN(8) { *(.sbss*) *(.gnu.linkonce.sb.*) *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) } >ram AT>ram :ram - PROVIDE( _end = . ); - PROVIDE( end = . ); - PROVIDE( metal_segment_bss_target_end = . ); + PROVIDE( metal_segment_bss_target_start = ADDR(.bss) ); + PROVIDE( metal_segment_bss_target_end = ADDR(.bss) + SIZEOF(.bss) ); .stack : { PROVIDE(metal_segment_stack_begin = .); From 18695b883014a7e086d0b0ae73940f99921cc4b3 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Mon, 26 Aug 2019 13:48:42 -0700 Subject: [PATCH 3/3] Don't build benchmarks for QEMU targets in regression Signed-off-by: Nathaniel Graff --- scripts/all-targets-build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/all-targets-build b/scripts/all-targets-build index 21bfc1f5a..26f1036f4 100755 --- a/scripts/all-targets-build +++ b/scripts/all-targets-build @@ -17,9 +17,11 @@ for target in ${targets[@]} do for program in "${programs[@]}" do - # Dhrystone doesn't fit in the QEMU S51 DTIM - if [ "${target}" == "qemu-sifive-s51" -a "${program}" == "dhrystone" ] ; then - continue + # Coremark and Dhrystone don't fit in QEMU targets + if [[ "${target}" == "qemu"* ]] ; then + if [ "${program}" == "dhrystone" -o "${program}" == "coremark" ] ; then + continue + fi fi make TARGET="${target}" PROGRAM="${program}" CONFIGURATION="${CONFIGURATION}" -j${nproc} software