https://sourceware.org/bugzilla/show_bug.cgi?id=18741
markus.eisenmann at gmx dot at changed: What |Removed |Added ---------------------------------------------------------------------------- Component|gas |binutils --- Comment #2 from markus.eisenmann at gmx dot at --- Further findings (IMHO - what I think): A) bdf/elf-attrs.c: function vendor_set_obj_attr_contents(): Fix of file-attributes length; previous tag-byte not counted. --- bdf/elf-attrs.c +++ bdf/elf-attrs.c @@ -183,7 +183,7 @@ memcpy (p, vendor_name, vendor_length); p += vendor_length; *(p++) = Tag_File; - bfd_put_32 (abfd, size - 4 - vendor_length, p); + bfd_put_32 (abfd, size - 5 - vendor_length, p); p += 4; attr = elf_known_obj_attributes (abfd)[vendor]; B) bdf/elf-attrs.c: function vendor_obj_attr_size(): Even in case of vendor==OBJ_ATTR_PROC do not adjust size if there are no attributes. --- bdf/elf-attrs.c +++ bdf/elf-attrs.c @@ -104,7 +104,7 @@ size += obj_attr_size (list->tag, &list->attr); /* <size> <vendor_name> NUL 0x1 <size> */ - return ((size || vendor == OBJ_ATTR_PROC) + return (size ? size + 10 + strlen (vendor_name) : 0); } In case of B), I'm not sure whether this is valid; Or readelf should be fixed to recognize an empty attribute-list after the vendor-name? Best regards from Salzburg, Markus P.S.: May a binutils-maintainer can review this issue and confirm, whether this is really an bug (or not)? -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils