[Dwarf-Discuss] DW_AT_segment and relocation

Jayvee Neumann jayvee.neumann at gmail.com
Thu Sep 26 03:33:06 PDT 2019


Dear DWARF experts,

I have a question regarding the attribute DW_AT_segment. I do not quite
understand how to handle it, yet.
It can appear in a DIE (or its parent) whenever DW_AT_low_pc,
DW_AT_high_pc, DW_AT_ranges, DW_AT_entry_pc, or a location description that
evaluates to an Address are used.
It can contain a location expression itself. So it can depend not only on
compile-time information but also on run-time information.

Assume, I have an attribute DW_AT_low_pc. If there is no DW_AT_segment,
this attribute is simply the low_pc as it was determined during
compile-time. While debugging, this value has to be relocated if the image
had been relocated. If there is a DW_AT_segment expression is relocation
still necessary? Evaluating the expression could also incorporate the usage
of run-time information and relocated addresses (i.e. the DS/CS/SS
registers).

I hope I was able to articulate my question well, English is not my native
language.

Kind Regards
Jayvee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/attachments/20190926/75042ec6/attachment.html>


More information about the Dwarf-Discuss mailing list