https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81968
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to rguent...@suse.de from comment #9) > On Tue, 29 Aug 2017, ro at CeBiTec dot Uni-Bielefeld.DE wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81968 > > > > --- Comment #8 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot > > Uni-Bielefeld.DE> --- > > > --- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> > > > --- > > > On Mon, 28 Aug 2017, ro at CeBiTec dot Uni-Bielefeld.DE wrote: > > [...] > > > Thanks. Can you check whether the above patch resolves the extra > > > warning about section flags? The symtab entry one will prevail > > > of course. > > > > Sure: it did indeed in last night's sparc-sun-solaris2.11 and > > i386-pc-solaris2.11 bootstraps. Thanks. > > > > However, I noticed now that I'd missed another ld warning: > > > > ld: warning: file /var/tmp//ccS6p31cdebugobjtem: section [29].symtab: > > symbol[30]: global symbol has no name > > > > and some more. Seen e.g in gcc.dg/debug/pr41893-1.c with -gdwarf-2 -g3. > > And indeed elfdump -s shows > > > > ro@colima 112 > elfdump -s /var/tmp//ccCyYAtcdebugobjtem |grep GLOB > > [29] 0 0 NOTY GLOB D 0 UNDEF > > [31] 0 0 NOTY GLOB D 0 UNDEF > > Ian steered me to use this in place of what I did before (a COMM > with zero size and no name). He said UNDEFs can be global. > > As said, similar to the section removal I do not actually remove > symbols because that requires editing relocation sections. > > Why does Solaris ld output warnings by default? Does it have an > option to suppress them? It doesn't seem that it considers them > errors? Btw, I suppose I can simply leave the names of the global UNDEFs in place. That'll remove that specific warning. Still the question is why solaris ld segfaults and whether there is a way to supress the section warning by doing some magic to the entry.