Hi,
The DWARF spec says (since version 4) that DW_AT_high_pc can be
represented by a constant form.
If the value of the DW_AT_high_pc is of class address, it is the
relocated address of the first location past the last
instruction associated with the entity; if it is of class
constant, the value is an unsigned integer offset which when
added to the low PC gives the address of the first location past
the last instruction associated with the entity.
I have a patch for gcc to encode DW_AT_high_pc this way (which saves a
lot of relocations) and jakub has a patch for dwz to encode
DW_AT_high_pc in the smallest possible constant form, which can save ~1%
on the size of debuginfo.
The attached patch adds a testcase for this and makes dwarf_highpc ()
handle the constant form.
Does this look OK?
Thanks,
Mark