Bug 679815

Summary: type_units and DW_AT_GNU_odr_signature support
Product: [Fedora] Fedora Reporter: Mark Wielaard <mjw>
Component: elfutilsAssignee: Roland McGrath <roland>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mjw, mjw, pmachata, roland
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: elfutils-0.153-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-02 01:18:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
testsuite/gdb.dwarf2/dw4-sig-types.x none

Description Mark Wielaard 2011-02-23 15:06:21 UTC
Created attachment 480487 [details]
testsuite/gdb.dwarf2/dw4-sig-types.x

Another gdb testsuite nitpick. Current gcc (4.5.1 20100924) with -gdwarf-4 outputs type_units with DW_AT_GNU_odr_signature set. eu-readelf doesn't know about these, dwarflint and libdw/c++/values.cc (from the dwarf branch) barf on them. It isn't immediately clear to me whether DW_AT_GNU_odr_signature is an alternative form of DW_AT_signature or not. It is a strange kind of "reference" since it really is a md5 hash in data8 form. Maybe gcc should just not output this anymore? testsuite file attached.

Some background http://gcc.gnu.org/wiki/DwarfSeparateTypeInfo

Comment 1 Roland McGrath 2011-02-23 17:50:17 UTC
I haven't found what DW_AT_GNU_odr_signature is actually used for.  It doesn't appear to be a reference kind of thing in the DWARF sense.  I've added eu-readelf support to print its name.

For the dwarf branch, there is just known-dwarf.h regeneration (--enable-maintainer-mode) that should keep dwarf::attributes::name from missing it.
There should not be anything else required there for handling it, it's just a 64-bit constant.  dwarflint might need to add it.

Comment 2 Petr Machata 2011-02-24 20:38:53 UTC
Thanks for this test case.  It uncovered a couple bugs that are now fixed on the dwarf branch where it makes sense.  I'll write to the list about the one place where it doesn't make sense.  I think we can consider this fixed from dwarflint perspective, too.

Comment 3 Mark Wielaard 2011-04-05 12:07:33 UTC
Just for reference, DW_AT_GNU_odr_signature isn't the same as DW_AT_signature.
DW_AT_GNU_odr_signature is meant to be a helper for One Definition Rule (ODR)
detection https://secure.wikimedia.org/wikipedia/en/wiki/One_Definition_Rule
but no support for it has been written yet. See:
http://gcc.gnu.org/ml/gcc/2011-04/msg00065.html

DW_AT_signature of course is a new reference type for .debug_types.

Comment 4 Mark Wielaard 2011-11-25 13:40:37 UTC
This can be closed when 0.153 is released. Commit 47c532 "Handle DW_AT_GNU_odr_signature in readelf." is all there is to do for now.

Comment 5 Fedora Update System 2012-02-24 15:22:51 UTC
elfutils-0.153-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/elfutils-0.153-1.fc16

Comment 6 Fedora Update System 2012-02-24 16:02:55 UTC
elfutils-0.153-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/elfutils-0.153-1.fc17

Comment 7 Fedora Update System 2012-02-24 22:32:47 UTC
Package elfutils-0.153-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing elfutils-0.153-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-2344/elfutils-0.153-1.fc17
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-03-02 01:18:56 UTC
elfutils-0.153-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2012-03-10 13:06:01 UTC
elfutils-0.153-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/elfutils-0.153-1.fc15

Comment 10 Fedora Update System 2012-03-10 21:53:30 UTC
elfutils-0.153-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2012-03-26 03:55:18 UTC
elfutils-0.153-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2012-03-26 17:58:51 UTC
elfutils-0.153-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.