Closed
Description
To reproduce:
echo "fn main(){}" >t.rs
rustc -g t.rs
objdump -h t|grep -A1 debug_gdb_scripts
16 .debug_gdb_scripts 00000022 000000000003ddc1 000000000003ddc1 0003ddc1 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
This is not a big deal on PCs, but somewhat more important on a microcontroller. On top of that, it produces extremely surprising messages when flashing the firmware via gdb (which is how I discovered it):
Loading section .text, size 0x1ae lma 0x0
Loading section .debug_gdb_scripts, size 0x22 lma 0x1ae
... and the debug script path potentially ends in the non-volatile storage, unnecessarily exposing information about the build environment.
Metadata
Metadata
Assignees
Labels
No labels