On Fri, Aug 9, 2019 at 3:57 PM Martin Liška <mli...@suse.cz> wrote: > > Hi. > > The patch is about prevention of LTO section name clashing. > Now we have a situation where body of 2 functions is streamed > into the same ELF section. Then we'll end up with smashed data. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed?
I think the comment should mention why we skip a leading '*' at all. IIRC this is some target mangling applied to DECL_ASSEMBLER_NAME? And section names cannot contain '*'? Or do we need to actually indentify '*fn' and 'fn' as the same? For the testcase what is the clashing symbol? Can't we have many so that using "0" always is broken as well? Richard. > Thanks, > Martin > > gcc/ChangeLog: > > 2019-08-09 Martin Liska <mli...@suse.cz> > > PR lto/91393 > PR lto/88220 > * lto-streamer.c (lto_get_section_name): Replace '*' leading > character with '0'. > > gcc/testsuite/ChangeLog: > > 2019-08-09 Martin Liska <mli...@suse.cz> > > PR lto/91393 > PR lto/88220 > * gcc.dg/lto/pr91393_0.c: New test. > --- > gcc/lto-streamer.c | 15 ++++++++++++--- > gcc/testsuite/gcc.dg/lto/pr91393_0.c | 11 +++++++++++ > 2 files changed, 23 insertions(+), 3 deletions(-) > create mode 100644 gcc/testsuite/gcc.dg/lto/pr91393_0.c > >