]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: anonymous typedef unions also can have linkage_name extension.
authorMark Wielaard <mjw@redhat.com>
Fri, 8 Apr 2011 21:10:15 +0000 (23:10 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 8 Apr 2011 21:10:15 +0000 (23:10 +0200)
dwarflint/check_linkage_external_die.cc
dwarflint/expected-at.cc

index b871b5394cbbed55579390fcb083b816987b545a..9d759dd1ffb08a0404b1dbd3f6d628b7211e1d1e 100644 (file)
@@ -139,11 +139,13 @@ namespace
          if (s == _m_symbols.end ())
            {
              // No symbol in table, OK, if not a defining or const object.
-             // GNU extension, anonymous structs can have a linkage_name.
+             // GNU extension, anonymous structs, enums and unions can
+             // have a linkage_name.
              if (attrs.find (DW_AT_declaration) == attrs.end ()
                  && attrs.find (DW_AT_const_value) == attrs.end ()
                  && ((entry.tag () != DW_TAG_structure_type
-                     && entry.tag () != DW_TAG_enumeration_type)
+                     && entry.tag () != DW_TAG_enumeration_type
+                     && entry.tag () != DW_TAG_union_type)
                      || attrs.find (DW_AT_name) != attrs.end ()))
                {
                  wr_message (to_where (entry),
index 016d2115c82ff3101c2fcf067ee2b99ad14e376b..d19f6d1565b64aefbcdac878e36933d0caf65b38 100644 (file)
@@ -747,6 +747,7 @@ expected_at_map::expected_at_map ()
     .optional (DW_AT_specification)
     .optional (DW_AT_start_scope)
     .optional (DW_AT_visibility)
+    .optional (at_linkage_name) // GNU extension for anonymous typedef unions.
     ;
 
   m_map [DW_TAG_unspecified_parameters]