https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91228
--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- [...] > Meh, I made the +1 at a wrong place. The correction patch should look like: > > diff --git a/libiberty/simple-object-elf.c b/libiberty/simple-object-elf.c > index bdee963634d..75159266596 100644 > --- a/libiberty/simple-object-elf.c > +++ b/libiberty/simple-object-elf.c > @@ -1388,8 +1388,8 @@ simple_object_elf_copy_lto_debug_sections > (simple_object_read *sobj, > (unsigned char *)strings, > strsz, &errmsg, err); > /* Find first '\0' in strings. */ > - gnu_lto = (char *) memchr (gnu_lto, '\0', > - strings + strsz - gnu_lto + 1); > + gnu_lto = (char *) memchr (gnu_lto + 1, '\0', > + strings + strsz - gnu_lto); > /* Read the section index table if present. */ > if (symtab_indices_shndx[i - 1] != 0) > { > > @Rainer: Does the patch work for you? I just tried it on i386-pc-solaris2.11 (not a bootstrap from scratch, but just applied the patch, restarted the build from there and ran the testsuite): all LTO-related failures are gone. Thanks. Rainer