ld: extensions to the internal linker script

Fangrui Song i@maskray.me
Thu Sep 17 06:08:22 GMT 2020


Hi, I filed a ticket about potential syntax for extending the internal
linker script (providing some SECTIONS fragments instead of the full
external linker script): https://sourceware.org/bugzilla/show_bug.cgi?id=26404

I am curious about your thoughts and suggested syntax on the feature.

IIUC, GCC wants to introduce some call graph profiling (ipa-reorder) features. If such
an extension exists, users don't have to upgrade binutils to have
*(SORT(.text.sorted.*)) in the output section .text

GCC can provide such a linker script with such a SECTIONS fragment.


More information about the Binutils mailing list