From b031ec0aaaeb01249c226f46c215a8f0ff4927af Mon Sep 17 00:00:00 2001 From: Jerzy Kasenberg Date: Mon, 25 Mar 2024 07:52:43 +0100 Subject: [PATCH] hmcu/stm32: Add link_tables to all ld scripts newt tool can create link_tables.ld.h file from pkg.link_table section This modifies all STM32 linker scripts to have this functionality. G4 and G0 already have common linker script so they are already covered. Signed-off-by: Jerzy Kasenberg --- hw/mcu/stm/stm32f0xx/stm32f0xx.ld | 1 + hw/mcu/stm/stm32f1xx/stm32f103.ld | 1 + hw/mcu/stm/stm32f3xx/stm32f303.ld | 1 + hw/mcu/stm/stm32f4xx/stm32f401.ld | 1 + hw/mcu/stm/stm32f4xx/stm32f407.ld | 1 + hw/mcu/stm/stm32f4xx/stm32f411.ld | 1 + hw/mcu/stm/stm32f4xx/stm32f413.ld | 1 + hw/mcu/stm/stm32f4xx/stm32f427.ld | 1 + hw/mcu/stm/stm32f4xx/stm32f429.ld | 1 + hw/mcu/stm/stm32f4xx/stm32f439.ld | 1 + hw/mcu/stm/stm32f7xx/stm32f746.ld | 1 + hw/mcu/stm/stm32f7xx/stm32f767.ld | 1 + hw/mcu/stm/stm32h7xx/stm32h723.ld | 1 + hw/mcu/stm/stm32l0xx/stm32l072.ld | 1 + hw/mcu/stm/stm32l0xx/stm32l073.ld | 1 + hw/mcu/stm/stm32l1xx/stm32l152.ld | 1 + hw/mcu/stm/stm32l4xx/stm32l476.ld | 1 + hw/mcu/stm/stm32u5xx/stm32u5xx.ld | 1 + hw/mcu/stm/stm32wbxx/stm32wb55.ld | 1 + 19 files changed, 19 insertions(+) diff --git a/hw/mcu/stm/stm32f0xx/stm32f0xx.ld b/hw/mcu/stm/stm32f0xx/stm32f0xx.ld index a9602ac846..8cbcec0531 100644 --- a/hw/mcu/stm/stm32f0xx/stm32f0xx.ld +++ b/hw/mcu/stm/stm32f0xx/stm32f0xx.ld @@ -107,6 +107,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f1xx/stm32f103.ld b/hw/mcu/stm/stm32f1xx/stm32f103.ld index 5a646e5eef..9aba6f59fb 100644 --- a/hw/mcu/stm/stm32f1xx/stm32f103.ld +++ b/hw/mcu/stm/stm32f1xx/stm32f103.ld @@ -107,6 +107,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f3xx/stm32f303.ld b/hw/mcu/stm/stm32f3xx/stm32f303.ld index b7ee776c3b..0f44f13fcd 100644 --- a/hw/mcu/stm/stm32f3xx/stm32f303.ld +++ b/hw/mcu/stm/stm32f3xx/stm32f303.ld @@ -108,6 +108,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f4xx/stm32f401.ld b/hw/mcu/stm/stm32f4xx/stm32f401.ld index 40a35de32e..03b1fcf9ad 100644 --- a/hw/mcu/stm/stm32f4xx/stm32f401.ld +++ b/hw/mcu/stm/stm32f4xx/stm32f401.ld @@ -105,6 +105,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f4xx/stm32f407.ld b/hw/mcu/stm/stm32f4xx/stm32f407.ld index 51eaa3b478..feb8ca80f6 100644 --- a/hw/mcu/stm/stm32f4xx/stm32f407.ld +++ b/hw/mcu/stm/stm32f4xx/stm32f407.ld @@ -105,6 +105,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f4xx/stm32f411.ld b/hw/mcu/stm/stm32f4xx/stm32f411.ld index 40a35de32e..03b1fcf9ad 100644 --- a/hw/mcu/stm/stm32f4xx/stm32f411.ld +++ b/hw/mcu/stm/stm32f4xx/stm32f411.ld @@ -105,6 +105,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f4xx/stm32f413.ld b/hw/mcu/stm/stm32f4xx/stm32f413.ld index 7615341cd3..4e20477a41 100644 --- a/hw/mcu/stm/stm32f4xx/stm32f413.ld +++ b/hw/mcu/stm/stm32f4xx/stm32f413.ld @@ -107,6 +107,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f4xx/stm32f427.ld b/hw/mcu/stm/stm32f4xx/stm32f427.ld index 51eaa3b478..feb8ca80f6 100644 --- a/hw/mcu/stm/stm32f4xx/stm32f427.ld +++ b/hw/mcu/stm/stm32f4xx/stm32f427.ld @@ -105,6 +105,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f4xx/stm32f429.ld b/hw/mcu/stm/stm32f4xx/stm32f429.ld index e473e33ffb..2b0b2ca4e8 100644 --- a/hw/mcu/stm/stm32f4xx/stm32f429.ld +++ b/hw/mcu/stm/stm32f4xx/stm32f429.ld @@ -108,6 +108,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f4xx/stm32f439.ld b/hw/mcu/stm/stm32f4xx/stm32f439.ld index e473e33ffb..2b0b2ca4e8 100644 --- a/hw/mcu/stm/stm32f4xx/stm32f439.ld +++ b/hw/mcu/stm/stm32f4xx/stm32f439.ld @@ -108,6 +108,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f7xx/stm32f746.ld b/hw/mcu/stm/stm32f7xx/stm32f746.ld index 2b017b47a8..1620784e0e 100644 --- a/hw/mcu/stm/stm32f7xx/stm32f746.ld +++ b/hw/mcu/stm/stm32f7xx/stm32f746.ld @@ -107,6 +107,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32f7xx/stm32f767.ld b/hw/mcu/stm/stm32f7xx/stm32f767.ld index 2b017b47a8..1620784e0e 100644 --- a/hw/mcu/stm/stm32f7xx/stm32f767.ld +++ b/hw/mcu/stm/stm32f7xx/stm32f767.ld @@ -107,6 +107,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32h7xx/stm32h723.ld b/hw/mcu/stm/stm32h7xx/stm32h723.ld index 2e41eed0ba..e50439baec 100644 --- a/hw/mcu/stm/stm32h7xx/stm32h723.ld +++ b/hw/mcu/stm/stm32h7xx/stm32h723.ld @@ -107,6 +107,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32l0xx/stm32l072.ld b/hw/mcu/stm/stm32l0xx/stm32l072.ld index 15b0a80077..558bb27022 100644 --- a/hw/mcu/stm/stm32l0xx/stm32l072.ld +++ b/hw/mcu/stm/stm32l0xx/stm32l072.ld @@ -106,6 +106,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32l0xx/stm32l073.ld b/hw/mcu/stm/stm32l0xx/stm32l073.ld index 15b0a80077..558bb27022 100644 --- a/hw/mcu/stm/stm32l0xx/stm32l073.ld +++ b/hw/mcu/stm/stm32l0xx/stm32l073.ld @@ -106,6 +106,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32l1xx/stm32l152.ld b/hw/mcu/stm/stm32l1xx/stm32l152.ld index 5a646e5eef..9aba6f59fb 100644 --- a/hw/mcu/stm/stm32l1xx/stm32l152.ld +++ b/hw/mcu/stm/stm32l1xx/stm32l152.ld @@ -107,6 +107,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32l4xx/stm32l476.ld b/hw/mcu/stm/stm32l4xx/stm32l476.ld index e0b6bf2cfa..ebe81cbd00 100644 --- a/hw/mcu/stm/stm32l4xx/stm32l476.ld +++ b/hw/mcu/stm/stm32l4xx/stm32l476.ld @@ -106,6 +106,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32u5xx/stm32u5xx.ld b/hw/mcu/stm/stm32u5xx/stm32u5xx.ld index e0b6bf2cfa..ebe81cbd00 100644 --- a/hw/mcu/stm/stm32u5xx/stm32u5xx.ld +++ b/hw/mcu/stm/stm32u5xx/stm32u5xx.ld @@ -106,6 +106,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/hw/mcu/stm/stm32wbxx/stm32wb55.ld b/hw/mcu/stm/stm32wbxx/stm32wb55.ld index bc61dc0287..21ad0fe4fb 100644 --- a/hw/mcu/stm/stm32wbxx/stm32wb55.ld +++ b/hw/mcu/stm/stm32wbxx/stm32wb55.ld @@ -107,6 +107,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + INCLUDE "link_tables.ld.h" *(.rodata*) KEEP(*(.eh_frame*))