Skip to content

Commit

Permalink
hmcu/stm32: Add link_tables to all ld scripts
Browse files Browse the repository at this point in the history
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 <jerzy.kasenberg@codecoup.pl>
  • Loading branch information
kasjer committed Mar 25, 2024
1 parent efa22cb commit b031ec0
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f0xx/stm32f0xx.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f1xx/stm32f103.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f3xx/stm32f303.ld
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f4xx/stm32f401.ld
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f4xx/stm32f407.ld
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f4xx/stm32f411.ld
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f4xx/stm32f413.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f4xx/stm32f427.ld
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f4xx/stm32f429.ld
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f4xx/stm32f439.ld
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f7xx/stm32f746.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32f7xx/stm32f767.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32h7xx/stm32h723.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32l0xx/stm32l072.ld
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32l0xx/stm32l073.ld
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32l1xx/stm32l152.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32l4xx/stm32l476.ld
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32u5xx/stm32u5xx.ld
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down
1 change: 1 addition & 0 deletions hw/mcu/stm/stm32wbxx/stm32wb55.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)

INCLUDE "link_tables.ld.h"
*(.rodata*)

KEEP(*(.eh_frame*))
Expand Down

0 comments on commit b031ec0

Please sign in to comment.