Skip to content

fbuild symbols: ESP32 .flash.rodata symbols classified as region=ram, inflating total_ram #1832

Closed

Description

@zackees

What happened

fbuild symbols (2.5.45 and 2.5.47) on an esp32c3 Arduino Blink ELF labels 445 symbols whose output_section is .flash.rodata with region: "ram". Only 16 .flash.rodata symbols get region: "flash". Most are ESP-IDF __func__/__FUNCTION__ strings. As a result, total_ram counts flash-resident constants as RAM.

Counts by (region, output_section) for one ELF:
('ram', '.flash.rodata'): 445, ('ram', '.dram0.bss'): 215, ('ram', '.dram0.data'): 120, ('flash', '.flash.rodata'): 16

Impact

FastLED's esp32c3 Blink budget guard failed with 'total_ram: 27018 B exceeds 26670 B by 348 B'. In fact physical DRAM (.dram0.data + .dram0.bss) fell from 13878 B to 13814 B. The apparent growth was +412 B of .flash.rodata strings. See FastLED/FastLED#4982.

Expected

Symbols placed in .flash.rodata (and other flash-mapped output sections) get region: flash, whatever their nm type letter (likely r/d for __func__ locals).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions