[Dwarf-Discuss] How best to represent multiple programs in a single file...
eager at eagercon.com
Tue Jan 4 11:51:59 PST 2011
Relph, Richard wrote:
>>> Understood. But is there an implied requirement that a given instruction location map to no
>>> more than one 'source line'?
>> I'm not sure what DWARF says about this, but it sure doesn't make any sense to me to have a
>> given instruction location map to more than one source line, block, or subroutine.
When multiple code paths are merged, one instruction can logically
be part of each path, with different source locations.
> Agreed. Hence my sense that I need to split the DWARF information for each kernel somehow, so
> that the DWARF for one kernel doesn't get confused with the DWARF for other kernels. I was
> thinking of simply appending the kernel name to each of the standard DWARF section names to
> create a set of kernel-specific DWARF sections, but that would obvious 'break' tools like
> libdwarf, dwarfdump, etc. So I came to the list to see if there was something I'm missing...
I'm not sure why there would be any confusion.
Reference in DWARF to machine addresses are resolved
by the linker. If the linker knows how to resolve
an address to the correct kernel, it should
You do need to have DWARF which describes each
kernel separately. You can't have a single DWARF
description for function B() when there are multiple
copies of that routine at different locations in
This "kernel" organization looks to me a lot like
overlays. I'm not exactly sure how other compilers
have handled this in ELF/DWARF.
Michael Eager eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Dwarf-Discuss