https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81968
--- Comment #26 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 8 Nov 2017, ebotcazou at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81968 > > --- Comment #25 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > > See the attached patch - it misses SHN_XINDEX handling. I'll come back to > > this during stage3 if nobody beats me to it. > > But AFAICS it doesn't deal with the SHT_NULL thing, does it? It does by removing the SHT_NULL sections. The patch should work - you can double-check - it just doesn't handle the "corner case" of more than 32000 input sections correctly when rewriting the symbol table.