Is there a way to add comments to a linker script?

6.7k views Asked by At

My question is very simple. Is there a way to add comments to a linker script? Like for example in a makefile:

# Comment
1

There are 1 answers

0
Chris Desjardins On

You may include comments in linker scripts just as in C, delimited by '/*' and '*/'. As in C, comments are syntactically equivalent to whitespace.

Directly from the docs: https://sourceware.org/binutils/docs-2.25/ld/Script-Format.html#Script-Format