PicoNexus / .github

PicoNexus for
Apache License 2.0
0 stars 0 forks source link

ERROR: ELF contains memory contents for uninitialized memory at 0x20000000 #1

Open 32bitmicro opened 4 months ago

32bitmicro commented 4 months ago

Compiling pico-examples using LLVM-ETOOL-18.1.8-rc1 results in this error message for a number of projects: ERROR: ELF contains memory contents for uninitialized memory at 0x20000000

/flash/program$ ../../elf2uf2/elf2uf2 -v ./flash_program.elf flash_program.uf2 Detected FLASH binary Mapped segment 10000000->10004c10 (10000000->10004c10) Mapped segment 10004c10->10004e64 (10004c10->10004e64) ERROR: ELF contains memory contents for uninitialized memory at 0x20000000

32bitmicro commented 4 months ago

Dump of elf headers for flash_program,.elf built with ETOOL Clang

readelf -a flash_program.elf ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: ARM Version: 0x1 Entry point address: 0x100001e9 Start of program headers: 52 (bytes into file) Start of section headers: 151212 (bytes into file) Flags: 0x5000200, Version5 EABI, soft-float ABI Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 11 Size of section headers: 40 (bytes) Number of section headers: 33 Section header string table index: 31

Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .flash_begin PROGBITS 10000000 000274 000000 00 A 0 0 1 [ 2] .boot2 PROGBITS 10000000 001000 000100 00 AX 0 0 1 [ 3] .text PROGBITS 10000100 001100 004b10 00 AX 0 0 16 [ 4] .rodata PROGBITS 10004c10 005c10 00021c 00 AMS 0 0 8 [ 5] .ARM.exidx ARM_EXIDX 10004e2c 005e2c 000010 00 AL 2 0 4 [ 6] .binary_info PROGBITS 10004e3c 005e3c 000028 00 A 0 0 4 [ 7] .ram_vector_table NOBITS 20000000 006000 0000c0 00 WA 0 0 4 [ 8] .tdata PROGBITS 200000c0 0060c0 000008 00 WAT 0 0 8 [ 9] .data PROGBITS 200000d0 0060d0 000370 00 WAX 0 0 16 [10] .uninitializ[...] NOBITS 20000440 006440 000000 00 WA 0 0 1 [11] .scratch_x PROGBITS 20040000 006440 000000 00 WA 0 0 1 [12] .scratch_y PROGBITS 20041000 006440 000000 00 WA 0 0 1 [13] .bss NOBITS 20000440 006440 0004cc 00 WA 0 0 8 [14] .heap NOBITS 2000090c 00690c 000800 00 A 0 0 4 [15] .stack_dummy NOBITS 20041000 007000 000800 00 A 0 0 32 [16] .flash_end PROGBITS 100051e0 007000 000000 00 A 0 0 1 [17] .comment PROGBITS 00000000 007000 000029 01 MS 0 0 1 [18] .ARM.attributes ARM_ATTRIBUTES 00000000 007029 000041 00 0 0 1 [19] .debug_abbrev PROGBITS 00000000 00706a 0027be 00 0 0 1 [20] .debug_info PROGBITS 00000000 009828 0045e0 00 0 0 1 [21] .debug_str_o[...] PROGBITS 00000000 00de08 0018e0 00 0 0 1 [22] .debug_str PROGBITS 00000000 00f6e8 001ec0 01 MS 0 0 1 [23] .debug_addr PROGBITS 00000000 0115a8 0004c4 00 0 0 1 [24] .debug_frame PROGBITS 00000000 011a6c 000de8 00 0 0 4 [25] .debug_line PROGBITS 00000000 012854 005eca 00 0 0 1 [26] .debug_line_str PROGBITS 00000000 01871e 00154e 01 MS 0 0 1 [27] .debug_aranges PROGBITS 00000000 019c6c 000040 00 0 0 1 [28] .debug_loclists PROGBITS 00000000 019cac 005bfd 00 0 0 1 [29] .debug_rnglists PROGBITS 00000000 01f8a9 00029b 00 0 0 1 [30] .symtab SYMTAB 00000000 01fb44 002fc0 10 32 545 4 [31] .shstrtab STRTAB 00000000 022b04 000176 00 0 0 1 [32] .strtab STRTAB 00000000 022c7a 002230 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), I (info), L (link order), O (extra OS processing required), G (group), T (TLS), C (compressed), x (unknown), o (OS specific), E (exclude), D (mbind), y (purecode), p (processor specific)

There are no section groups in this file.

Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x001000 0x10000000 0x10000000 0x04c10 0x04c10 R E 0x1000 LOAD 0x005c10 0x10004c10 0x10004c10 0x00254 0x00254 R 0x1000 LOAD 0x006000 0x20000000 0x20000000 0x000c8 0x000c8 RW 0x1000 LOAD 0x0060d0 0x200000d0 0x10004e70 0x00370 0x00370 RWE 0x1000 LOAD 0x006440 0x20000440 0x20000440 0x00000 0x004cc RW 0x1000 LOAD 0x00690c 0x2000090c 0x2000090c 0x00000 0x00800 R 0x1000 LOAD 0x007000 0x20041000 0x20041000 0x00000 0x00800 R 0x1000 TLS 0x0060c0 0x200000c0 0x200000c0 0x00008 0x00008 R 0x8 GNU_RELRO 0x0060c0 0x200000c0 0x200000c0 0x00008 0x00008 R 0x1 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0 EXIDX 0x005e2c 0x10004e2c 0x10004e2c 0x00010 0x00010 R 0x4

Section to Segment mapping: Segment Sections... 00 .boot2 .text 01 .rodata .ARM.exidx .binary_info 02 .ram_vector_table .tdata 03 .data 04 .uninitialized_data .bss 05 .heap 06 .stack_dummy 07 .tdata 08 .tdata 09
10 .ARM.exidx

There is no dynamic section in this file.

There are no relocations in this file.

Unwind section '.ARM.exidx' at offset 0x5e2c contains 2 entries:

0x10000000: 0x1 [cantunwind]

0x20000354 <__Thumbv6MABSLongThunk_best_effort_wfe_or_timeout>: 0x1 [cantunwind]

32bitmicro commented 4 months ago

Dump of elf headers for flash_program,.elf built with gcc

ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: ARM Version: 0x1 Entry point address: 0x100001e9 Start of program headers: 52 (bytes into file) Start of section headers: 51472 (bytes into file) Flags: 0x5000200, Version5 EABI, soft-float ABI Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 3 Size of section headers: 40 (bytes) Number of section headers: 19 Section header string table index: 18

Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .boot2 PROGBITS 10000000 001000 000100 00 AX 0 0 1 [ 2] .text PROGBITS 10000100 001100 0045b0 00 AX 0 0 8 [ 3] .rodata PROGBITS 100046b0 0056b0 000438 00 A 0 0 8 [ 4] .binary_info PROGBITS 10004ae8 005ae8 000028 00 A 0 0 4 [ 5] .ram_vector_table NOBITS 20000000 007000 0000c0 00 WA 0 0 4 [ 6] .data PROGBITS 200000c0 0060c0 000744 00 WAX 0 0 16 [ 7] .uninitializ[...] PROGBITS 20000804 006804 000000 00 W 0 0 1 [ 8] .scratch_x PROGBITS 20040000 006804 000000 00 W 0 0 1 [ 9] .scratch_y PROGBITS 20041000 006804 000000 00 W 0 0 1 [10] .bss NOBITS 20000808 007000 0004dc 00 WA 0 0 8 [11] .heap PROGBITS 20000ce4 006804 000800 00 0 0 4 [12] .stack_dummy PROGBITS 20041000 007020 000800 00 0 0 32 [13] .ARM.attributes ARM_ATTRIBUTES 00000000 007820 000028 00 0 0 1 [14] .comment PROGBITS 00000000 007848 00004c 01 MS 0 0 1 [15] .debug_frame PROGBITS 00000000 007894 000060 00 0 0 4 [16] .symtab SYMTAB 00000000 0078f4 003140 10 17 575 4 [17] .strtab STRTAB 00000000 00aa34 001e1d 00 0 0 1 [18] .shstrtab STRTAB 00000000 00c851 0000bd 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), I (info), L (link order), O (extra OS processing required), G (group), T (TLS), C (compressed), x (unknown), o (OS specific), E (exclude), D (mbind), y (purecode), p (processor specific)

There are no section groups in this file.

Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x001000 0x10000000 0x10000000 0x04b10 0x04b10 R E 0x1000 LOAD 0x0060c0 0x200000c0 0x10004b10 0x00744 0x00744 RWE 0x1000 LOAD 0x000000 0x20000000 0x20000000 0x00000 0x00ce4 RW 0x1000

Section to Segment mapping: Segment Sections... 00 .boot2 .text .rodata .binary_info 01 .data 02 .ram_vector_table .bss

There is no dynamic section in this file.

There are no relocations in this file.

There are no unwind sections in this file.