File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1117,7 +1117,20 @@ static void DoReadELFSegments(RangeSink* sink, ReportSegmentsBy report_by) {
1117
1117
continue ;
1118
1118
}
1119
1119
1120
- std::string name = " LOAD [" ;
1120
+ // Include the segment index in the label, to support embedded.
1121
+ //
1122
+ // Including the index in the segment label differentiates
1123
+ // segments with the same access control (e.g. RWX vs RW). In
1124
+ // ELF files built for embedded microcontroller projects, a
1125
+ // segment is used for each distinct type of memory. In simple
1126
+ // cases, there is a segment for the flash (which will store
1127
+ // code and read-only data) and a segment for RAM (which
1128
+ // usually stores globals, stacks, and maybe a heap). In more
1129
+ // involved projects, there may be special segments for faster
1130
+ // RAM (e.g. core coupled RAM or CCRAM), or there may even be
1131
+ // memory overlays to support manual paging of code from flash
1132
+ // (which may be slow) into RAM.
1133
+ std::string name (absl::StrCat (" LOAD #" , i, " [" ));
1121
1134
1122
1135
if (header.p_flags & PF_R) {
1123
1136
name += ' R' ;
You can’t perform that action at this time.
0 commit comments