According to the Dwarf spec DW_AT_data_member_location can also take a
simple constant offset when encoded as DW_FORM_data or
DW_FORM_[us]data. I submitted a patch to gcc to output that instead of a
whole location expression block when possible. The attached patch makes
readelf display such simple offsets as constants.
Show replies by date
As I read the spec, it's only class loclistptr if it's the one of data
that matches the CU's offset_size. i.e., data8 is actually class constant.
Hmm, I think I've changed my mind after reading different parts of the spec.
So please go ahead and push that readelf change.