December 23, 2016

Linker Scripts

When you write C programs that run under linux, you never have to worry about this. There is a hidden default linker script that controls the linking of your program. But when you start linked code for some kind of embedded system, you need to learn about these to get control over the linking process. The "-T" switch on the linker command line specifies the name of the linker script to be used.

If you are using gcc as the linker, you can use the -T switch, but also the -Wl,option allows you to pass linker options through gcc. You can use a comma separated list to pass several.

More needs to be written here, perhaps someday ...


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org