jcmvbkbc wrote:projectgus wrote:cal wrote:gcc/gas/gld/objcopy hackery.
I have also wanted this. jcmvbkbc's esp-elf-rom is useful but gdb tries to load it as a new image. I don't have a solution yet either, there must be a straightforward way though.
You can load your main image as usual and then use add-symbol-file bootrom.elf 0x40000000 to add symbols for ROM.
Would it improve something if the symbols were tagged as ".type @function"?
What do you think about marking the indirect references as objects so that they are not disassembled?
_r_40000094 = 0x40000094 - 0x40000000 + _stext
.global _r_40000094
.type _r_40000094,@object
.size _r_40000094,4
# get back into "code" mode
_r_40000094_end = _r_40000094 + 4
.type _r_40000094_end,@function
I added those in my experiments for all l32r and similiar that reference a symbol with offset.
Strangely enough the the disasm output uses blocks of 3 bytes but I find that still easier to grasp then
wrong instructions.
Cal