On Mon, Aug 14, 2017 at 6:17 AM, Richard Biener <rguent...@suse.de> wrote: > On Fri, 4 Aug 2017, Richard Biener wrote: > >> On Fri, 28 Jul 2017, Jason Merrill wrote: >> >> > On 07/28/2017 05:55 PM, Jason Merrill wrote: >> > > On Fri, Jul 28, 2017 at 8:54 AM, Richard Biener <rguent...@suse.de> >> > > wrote: >> > > > On Tue, 4 Jul 2017, Richard Biener wrote: >> > > > >> > > > > On Tue, 20 Jun 2017, Richard Biener wrote: >> > > > > >> > > > > > On Wed, 7 Jun 2017, Richard Biener wrote: >> > > > > > >> > > > > > > On Fri, 19 May 2017, Richard Biener wrote: >> > > > > > > >> > > > > > > > >> > > > > > > > This is a repost (unchanged) of the simple-object ELF support >> > > > > > > > for >> > > > > > > > early LTO debug transfer from IL object to a separate >> > > > > > > > debug-only >> > > > > > > > object >> > > > > > > > file. >> > > > > > > > >> > > > > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu. >> > > > > > > >> > > > > > > Ping. >> > > > > > >> > > > > > Ping^2. >> > > > > >> > > > > Ping^3. >> > > > >> > > > Ping^4. Adding some more global reviewers to CC. >> > > >> > > Looking at it now, sorry for the delay. >> > >> > Actually, the simple-object stuff is more Ian's area. Looking at the other >> > part. >> >> Ian, ping -- we're through with the other part >> (https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00374.html). The >> simple-object part is unchanged at >> >> https://gcc.gnu.org/ml/gcc-patches/2017-05/msg01541.html >> >> nearly unchanged from the post last year (which also includes >> some description): >> >> https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01292.html > > Ian, ping again! (trying now also with the e-mail listed in > MAINTAINERS) > > https://gcc.gnu.org/ml/gcc-patches/2017-05/msg01541.html
Sorry about that, for some reason GMail didn't flag this message for me. > + for (ent = buf + entsize; ent < buf + length; ent += entsize) > + { > + unsigned sec = type_functions->fetch_Elf_Word (ent); > + if (pfnret[sec - 1] == 0) > + keep = 1; > + } > + if (keep) > + { > + pfnret[sh_link - 1] = 0; > + pfnret[i - 1] = 0; > + } > + } It seems to me that if you keep any section of an SHT_GROUP, you need to keep all the sections. Otherwise the section indexes in the group will be left dangling. The symbol table handling is pretty awful. Can't you just remove the symbols you don't want? You will have to update the sh_info field of the SHT_SYMTAB section, which holds the index of the first STB_GLOBAL symbol in the table. Ian