File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -706,7 +706,10 @@ def save(self, filename):
706
706
# So bootdesc will be at the very top of the binary at 0x20 offset
707
707
# (in the first segment).
708
708
for segment in ram_segments :
709
- if segment .name == ".dram0.bootdesc" :
709
+ if (
710
+ isinstance (segment , ELFSection )
711
+ and segment .name == ".dram0.bootdesc"
712
+ ):
710
713
ram_segments .remove (segment )
711
714
ram_segments .insert (0 , segment )
712
715
break
@@ -985,7 +988,7 @@ def save(self, filename):
985
988
while len (flash_segments ) > 0 :
986
989
segment = flash_segments [0 ]
987
990
# remove 8 bytes empty data for insert segment header
988
- if segment .name == ".flash.rodata" :
991
+ if isinstance ( segment , ELFSection ) and segment .name == ".flash.rodata" :
989
992
segment .data = segment .data [8 :]
990
993
# write the flash segment
991
994
checksum = self .save_segment (f , segment , checksum )
You can’t perform that action at this time.
0 commit comments