liveBook · Manning

Text section

As explained in Embedded Software with Rust

The .text section is an executable program section containing machine code.

The .text section holds program code. In a bare-metal linker script, map it to FLASH so the code can execute in place. section 4.1.3 section 4.1.1

.text :
  {
    *(.text .text.*)
  } > FLASH

  .rodata :
  {
    *(.rodata .rodata.*)
  } > FLASH

This linker rule gathers .text input sections and places them in FLASH. section 4.1.3

How Embedded Software with Rust covers it

How deep it goes
Shows a linker-script rule that maps code sections to FLASH and explains execution in place.
Examples
Uses a linker rule that gathers .text input sections and maps them to FLASH.
What you can do after
Configure a linker script to place program code in FLASH.
How it connects
Connects linker scripts with FLASH placement, load and virtual addresses, and read-only data.

This explainer was generated by Manning's knowledge graph from the text of Embedded Software with Rust. The section links point to the parts of the book it draws on.