Commit ec84a75
fix(elf2image): handle PREINIT_ARRAY section type in ESP32-P4 elf file properly
ESP32-P4 ELF files can contain PREINIT_ARRAY sections that were not being
properly included in the output binary, causing applications to fail.
ESP32-P4 is unique in having a .flash.init_array section in its linker
script that collects .preinit_array input sections. Since input sections
have different types (PREINIT_ARRAY and INIT_ARRAY), PREINIT_ARRAY is
processed first but was not handled correctly by esptool, resulting in
its exclusion from the output binary.
Other ESP32 variants don't experience this issue because their .preinit_array
sections are located in .flash.rodata with PROGBITS type, which is already
properly handled.1 parent 2a92320 commit ec84a75
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
1290 | | - | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1291 | 1297 | | |
1292 | 1298 | | |
1293 | 1299 | | |
| |||
0 commit comments