On 01/10/2018 03:05 AM, Richard Biener wrote: > > This joint work rewrites LTO debug section copying to not leave > discarded sections around as SHT_NULL but to really discard them > and deal with the fallout (remapping all remaining section references). > This is to avoid diagnostics from the Solaris linker which doesn't > like those. > > LTO bootstrapped on x86_64-unknown-linux-gnu, I also tested the > "incredibly large # of sections" testcase to verify SHN_XINDEX > handling. A regular bootstrap & test run is currently in progress. > > Rainer, can you check this patch on Solaris? Maybe we can finally > close that PR ... > > Ok for trunk? > > Thanks, > Richard. > > 2017-01-10 Richard Biener <rguent...@suse.de> > Rainer Orth <r...@cebitec.uni-bielefeld.de> > > PR lto/81968 > libiberty/ > * simple-object-common.h (struct simple_object_functions): > Change copy_lto_debug_sections callback signature. > * simple-object-elf.c (SHN_HIRESERVE, SHT_SYMTAB_SHNDX, > SHF_INFO_LINK): Add defines. > (simple_object_elf_copy_lto_debug_sections): Instead of > leaving not to be copied sections empty unnamed SHT_NULL > remove them from the target section headers and adjust section > reference everywhere. Handle SHN_XINDEX in the symbol table > processing properly. > * simple-object.c (handle_lto_debug_sections): Change > interface to return a modified string and handle renaming > of relocation sections. Note there's also 82005 which affects Darwin. It might be worth reaching out to the Darwin folks and see if this helps them as well.
jeff