For AVR the .text section can start at address 0, rather check if section is not allocated before ignoring it.

This commit is contained in:
ccrause 2024-02-25 17:39:45 +02:00 committed by Martin
parent d30cfb0a95
commit 88a0e31b16

View File

@ -499,7 +499,7 @@ begin
if (SectIdx < 0) or (SectIdx >= fElfFile.seccount) then
continue;
Sect := @fElfFile.sections[SectIdx];
if Sect^.Address = 0 then
if (Sect^.Flags and SHF_ALLOC) = 0 then
continue; // not loaded, symbol not in memory
SymbolName:=pchar(SymbolStr+SymbolArr64^[i].st_name);
@ -526,7 +526,7 @@ begin
if (SectIdx < 0) or (SectIdx >= fElfFile.seccount) then
continue;
Sect := @fElfFile.sections[SectIdx];
if Sect^.Address = 0 then
if (Sect^.Flags and SHF_ALLOC) = 0 then
continue; // not loaded, symbol not in memory
SymbolName:=pchar(SymbolStr+SymbolArr32^[i].st_name);