File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -182,14 +182,14 @@ fn symbols_by_section(
182
182
result. sort_by ( |a, b| a. address . cmp ( & b. address ) . then ( a. size . cmp ( & b. size ) ) ) ;
183
183
let mut iter = result. iter_mut ( ) . peekable ( ) ;
184
184
while let Some ( symbol) = iter. next ( ) {
185
- if symbol. kind == ObjSymbolKind :: Unknown && symbol . size == 0 {
185
+ if symbol. size == 0 {
186
186
if let Some ( next_symbol) = iter. peek ( ) {
187
187
symbol. size = next_symbol. address - symbol. address ;
188
188
} else {
189
189
symbol. size = ( section. address + section. size ) - symbol. address ;
190
190
}
191
191
// Set symbol kind if we ended up with a non-zero size
192
- if symbol. size > 0 {
192
+ if symbol. kind == ObjSymbolKind :: Unknown && symbol . size > 0 {
193
193
symbol. kind = match section. kind {
194
194
ObjSectionKind :: Code => ObjSymbolKind :: Function ,
195
195
ObjSectionKind :: Data | ObjSectionKind :: Bss => ObjSymbolKind :: Object ,
You can’t perform that action at this time.
0 commit comments