error "rom: requested regions overlap" for NOLOAD sections
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
command line:
qemu-system-arm -semihosting -nographic -monitor null -serial null -no-reboot -kernel build/fw/
output:
rom: requested regions overlap (rom phdr #6: build/fw/
rom loading failed
I checked the sections of the .elf file with arm-none-
Sections:
Idx Name Size VMA LMA File off Algn
...
35 .marker_appli 00001000 801ae000 801ae000 00025000 2**0
36 .safe_data 00000014 80200000 8001b000 00020000 2**2
37 .safe_bss 00000488 80200020 8001b020 00020014 2**2
38 .marker_safe_data 00001000 80201000 8001c000 00029000 2**0
39 .data 000008cc 80202000 8001b600 00022000 2**3
40 .bss 0000312c 802028d0 8001bed0 000228cc 2**3
41 .marker_data 00001000 80206000 8001f600 00026000 2**0
42 .cunit 00010000 80300000 80119600 00028000 2**0
43 .marker_code 00001000 8001c000 8001c000 00024000 2**0
...
So I had a look where the values in the error message could come from:
0x8001c000: is the "LMA" value of section .marker_safe_data
0x8001effc: is "Size" + "LMA" of the .bss section (0x0000312c + 0x8001bed0)
So it is correct that (regarding the "LMA" value) the .marker_safe_data section collides with .bss section.
But actually these sections have no "LOAD" attribute, so I would guess that their "LMA" should not be used anyway.
Those section should reside at their "VMA" addresses (0x802xxxxx) during runtime but they have no data to load.
Or am I getting something completely wrong?
Should I give an additional option to qemu?
I got this error with 2.0.0+dfsg-
I didn't get this error (but others) with 0.10.2
Changed in qemu: | |
status: | Fix Committed → Fix Released |
I did a test (with version 2.2.0) to simply not fail out upon this error (removed the "return -1" in function rom_load_all() in file hw/core/loader.c).
With that hack I got the elf file running I'll attach with *this* comment (note that attachment #1 won't run correctly but probably for some other reason as I never had this working anywhere). EmoDatauP1_ CUNIT.elf
So when I run with my hack:
qemu-system-arm -M integratorcp -semihosting -nographic -monitor null -serial null -no-reboot -kernel 0MFWSL_
I get: EmoDatauP1_ CUNIT.elf. free=0x00000000 00017ae0, addr=0x00000000 00016aac) EmoDatauP1_ CUNIT.elf. free=0x00000000 000185e8, addr=0x00000000 00017e64)
rom: requested regions overlap (rom phdr #4: 0MFWSL_
rom: requested regions overlap (rom phdr #5: 0MFWSL_
CUnit - A Unit testing framework for C - Version 2.1-0 cunit.sourcefor ge.net/
http://
Suite: MFWSL_EmoData leHdr ... passed dSect ... passed leSect ... passed oCpyList ... passed ableForSect ... passed ListFromSect ... passed MoList ... passed mosActive ... passed
Test: MFWSL_EmoFileOpen ... passed
Test: MFWSL_ChkEmosSodHdr ... passed
Test: MFWSL_ChkEmosFi
Test: MFWSL_ChkEmosSo
Test: MFWSL_ChkEmosFi
Test: MFWSL_AddEntryT
Test: MFWSL_EmosAvail
Test: MFWSL_CreateCpy
Test: MFWSL_SodEmosActive ... passed
Test: MFWSL_CreateExt
Test: MFWSL_ExtendedE
--Run Summary: Type Total Ran Passed Failed
suites 1 1 n/a 0
tests 11 11 11 0
asserts 2854 2854 2854 0
...where the last part is the output I expected for a clean run.
regarding the values in the error messages I it looks like: 00017ae0 = end of .safe_bss (0x16aac + 0x1034) which is NOLOAD 00016aac = start of .data which is LOAD 000185e8 = end of .bss (0x17570 + 0x1078) which is NOLOAD 00017e64 = start of .marker1 which is NOLOAD
free=0x00000000
addr=0x00000000
free=0x00000000
addr=0x00000000
Any optinions?