Skip to content

Commit a583931

Browse files
tkchiakeith-packard
authored andcommitted
Have linker script spot .text.sorted.* sections, & sort them
Sorted .text.* subsections were added to GNU ld's default linker script & supporting code, around 2019 (sourceware.org/pipermail/binutils/2019-September/108181.html). They were introduced to aid link-time optimisation, & may also have other uses.
1 parent 61fe813 commit a583931

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

picolibc.ld.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ SECTIONS
6767
/* code */
6868
*(.literal.unlikely .text.unlikely .literal.unlikely.* .text.unlikely.*)
6969
*(.literal.startup .text.startup .literal.startup.* .text.startup.*)
70+
*(SORT(.text.sorted.*))
7071
*(.literal .text .literal.* .text.* .opd .opd.* .branch_lt .branch_lt.* @EXTRA_TEXT_SECTIONS@)
7172
*(.gnu.linkonce.t.*)
7273
KEEP (*(.fini .fini.*))

0 commit comments

Comments
 (0)