CLion
 
Get CLion
Join the CLion 2025.1 Early Access Program and try out new features before they are released! Find out more

Linker scripts

Last modified: 11 February 2024

To assist you in creating and editing linker scripts for embedded development, CLion supports the Linker Script (LD) language.

The following code insight features are available for your .ld files:

  • Customizable syntax highlighting

    To configure the color scheme for linker scripts, go to Settings | Editor | Color Scheme | LinkerScript:

    Linker scripts color scheme
  • Keywords completion

    Code completion in linker scripts
  • Code folding

    Folding/unfolding is available for the sections, memory, and phdrs blocks:

    Code folding in linker scripts

    tip

    Press CtrlNumPad -/CtrlNumPad + to fold or unfold a code fragment

  • Structure view

    To open the Structure view, press Alt07 (for the tool window) or CtrlF12 (for the popup).

    In linker scripts, Structure shows the top-level commands, such as sections, memory, version, and phdrs:

    Structure view for linker scripts