diff --git a/bsp/ft2004/ft_aarch32.lds b/bsp/ft2004/ft_aarch32.lds index d37332d97f..c3eb35dfd8 100644 --- a/bsp/ft2004/ft_aarch32.lds +++ b/bsp/ft2004/ft_aarch32.lds @@ -4,7 +4,7 @@ OUTPUT_ARCH(arm) SECTIONS { . = 0x80100000; - + __text_start = .; .text : { @@ -45,8 +45,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/qemu-vexpress-a9/link.lds b/bsp/qemu-vexpress-a9/link.lds index 8e4f65b454..b98f48de22 100644 --- a/bsp/qemu-vexpress-a9/link.lds +++ b/bsp/qemu-vexpress-a9/link.lds @@ -16,7 +16,7 @@ SECTIONS __rt_utest_tc_tab_start = .; KEEP(*(UtestTcTab)) __rt_utest_tc_tab_end = .; - + /* section information for finsh shell */ . = ALIGN(4); __fsymtab_start = .; @@ -59,8 +59,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/qemu-vexpress-gemini/vexpress.lds b/bsp/qemu-vexpress-gemini/vexpress.lds index 2e631aa4ae..c7c762a074 100644 --- a/bsp/qemu-vexpress-gemini/vexpress.lds +++ b/bsp/qemu-vexpress-gemini/vexpress.lds @@ -20,7 +20,7 @@ SECTIONS __vsymtab_start = .; KEEP(*(VSymTab)) __vsymtab_end = .; - . = ALIGN(4); + . = ALIGN(4); /* section information for modules */ . = ALIGN(4); @@ -44,8 +44,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/qemu-virt64-aarch64/link.lds b/bsp/qemu-virt64-aarch64/link.lds index 9d1ece0010..fcddffe995 100644 --- a/bsp/qemu-virt64-aarch64/link.lds +++ b/bsp/qemu-virt64-aarch64/link.lds @@ -88,8 +88,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/raspberry-pi/raspi2/link.lds b/bsp/raspberry-pi/raspi2/link.lds index 2624a5a95d..71c92384fa 100644 --- a/bsp/raspberry-pi/raspi2/link.lds +++ b/bsp/raspberry-pi/raspi2/link.lds @@ -75,8 +75,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/raspberry-pi/raspi3-32/link.lds b/bsp/raspberry-pi/raspi3-32/link.lds index 2624a5a95d..71c92384fa 100644 --- a/bsp/raspberry-pi/raspi3-32/link.lds +++ b/bsp/raspberry-pi/raspi3-32/link.lds @@ -75,8 +75,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/raspberry-pi/raspi3-64/link.lds b/bsp/raspberry-pi/raspi3-64/link.lds index c17d66dbdf..d03d0bd42e 100644 --- a/bsp/raspberry-pi/raspi3-64/link.lds +++ b/bsp/raspberry-pi/raspi3-64/link.lds @@ -77,8 +77,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/raspberry-pi/raspi4-32/link.lds b/bsp/raspberry-pi/raspi4-32/link.lds index 6ab3707d08..344c765acc 100644 --- a/bsp/raspberry-pi/raspi4-32/link.lds +++ b/bsp/raspberry-pi/raspi4-32/link.lds @@ -85,8 +85,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/raspberry-pi/raspi4-64/link.lds b/bsp/raspberry-pi/raspi4-64/link.lds index c17d66dbdf..d03d0bd42e 100644 --- a/bsp/raspberry-pi/raspi4-64/link.lds +++ b/bsp/raspberry-pi/raspi4-64/link.lds @@ -77,8 +77,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/rm48x50/rm48x50.ld b/bsp/rm48x50/rm48x50.ld index 340a3a3223..746bf253e1 100644 --- a/bsp/rm48x50/rm48x50.ld +++ b/bsp/rm48x50/rm48x50.ld @@ -63,8 +63,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } > CODE diff --git a/bsp/rockchip/rk3568/link.lds b/bsp/rockchip/rk3568/link.lds index 406e8c4a6c..6401f4a40d 100644 --- a/bsp/rockchip/rk3568/link.lds +++ b/bsp/rockchip/rk3568/link.lds @@ -79,8 +79,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } diff --git a/bsp/zynqmp-r5-axu4ev/zynqmp-r5.ld b/bsp/zynqmp-r5-axu4ev/zynqmp-r5.ld index 3c16898c3f..6a7d2db7fb 100644 --- a/bsp/zynqmp-r5-axu4ev/zynqmp-r5.ld +++ b/bsp/zynqmp-r5-axu4ev/zynqmp-r5.ld @@ -14,7 +14,7 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) SECTIONS { - .vectors : + .vectors : { KEEP (*(.vectors)) *(.boot) @@ -32,7 +32,7 @@ SECTIONS __rt_utest_tc_tab_start = .; KEEP(*(UtestTcTab)) __rt_utest_tc_tab_end = .; - + /* section information for finsh shell */ . = ALIGN(4); __fsymtab_start = .; @@ -80,8 +80,9 @@ SECTIONS .ctors : { PROVIDE(__ctors_start__ = .); - KEEP(*(SORT(.ctors.*))) - KEEP(*(.ctors)) + /* new GCC version uses .init_array */ + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) PROVIDE(__ctors_end__ = .); } > psu_r5_ddr_0_MEM_0