]> sourceware.org Git - libabigail.git/commit
Bug 22692 - Consider Java as a language that supports the ODR
authorDodji Seketeli <dodji@redhat.com>
Wed, 10 Jan 2018 11:25:34 +0000 (12:25 +0100)
committerDodji Seketeli <dodji@redhat.com>
Wed, 10 Jan 2018 11:45:51 +0000 (12:45 +0100)
commit6909dcb43cdd3bb3929dfa8339344a4705a2ecd3
treec507d6e5a96e6552863506068598742e116a77c7
parent2df84dd7672c3ac2bb2755326db3a937f3451294
Bug 22692 - Consider Java as a language that supports the ODR

While comparing libgcj.so, it turned out that we are trying to
canonicalize a DW_TAG_class_type DIE expressing a Java type.

Right now, we don't canonicalize DW_TAG_class_type yet because
languages that emit those DIEs (like C++) do respect the One
Definition Rule.  So in theory, we do not need to canonicalize the
DW_TAG_class_type by using structural comparison.  We only perform DIE
canonicalization of DIEs originating from the C language as that
language does not respect the ODR.

We were assuming that only C++ actually respects the ODR.  In
practise, Java does also, so this patch now assumes that C++ and Java
respect the ODR.  So when facing DIEs originating from those
languages, we don't try (yet) to canonicalize their DIEs.

In the future though, we need to canonicalize all DIEs, irrespective
of the language they originated from.  And for that, we need to
support structural comparison of DW_TAG_class_type DIEs, among others.

* include/abg-ir.h (is_java_language): Declare new function.
* src/abg-dwarf-reader.cc (odr_is_relevant): Adjust to consider
that Java also respects the ODR.
* src/abg-ir.cc (is_java_language): Define new function.
(odr_is_relevant): Adjust to consider that Java also respects the
ODR.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-ir.h
src/abg-dwarf-reader.cc
src/abg-ir.cc
This page took 0.035398 seconds and 5 git commands to generate.