dwarflint allow strange combinations of attribute/form in gnu mode

Mark Wielaard mjw at redhat.com
Sun Apr 3 14:25:36 UTC 2011


Hi,

On Wed, 2011-03-30 at 12:53 +0200, Mark Wielaard wrote:
> I came across a strange combination of new attribute with old form for
> gcc. When gcc isn't using -gstrict-dwarf, it allows attributes from
> newer versions, but doesn't use new forms, even if such an attribute
> would need that. So this patch allows that (in particular for
> DW_AT_ranges for dwarf2), but only in gnu mode. Does this look like a
> sane solution?

On irc Petr told me he didn't like the creeping of the version as state
into dwarf_gnu. So this simpler version, just allows it as gnu extension
in general. Petr, does this new patch look better?

The reason I would really like this to get resolved is because upstream
gcc defaults to non-strict dwarf-2 + gnu extensions, which will output
this form for the ranges attribute. Which results in low-level check
failure, so you cannot run any high-level check against such binaries.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwarf-gnu-new-old.patch
Type: text/x-patch
Size: 1532 bytes
Desc: not available
Url : https://fedorahosted.org/pipermail/elfutils-devel/attachments/20110403/07d7892a/attachment.bin 


More information about the elfutils-devel mailing list