https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81968
--- Comment #33 from rguenther at suse dot de <rguenther at suse dot de> --- On December 21, 2017 4:20:35 PM GMT+01:00, "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzi...@gcc.gnu.org> wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81968 > >--- Comment #32 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec >dot Uni-Bielefeld.DE> --- >Here are the additional types of failures found on Solaris/x86: > >* Invalid sh_info: > >FAIL: g++.dg/lto/pr42987 cp_lto_pr42987_0.o-cp_lto_pr42987_1.o link, >-flto >-flto-partition=none -g >FAIL: g++.dg/lto/pr42987 cp_lto_pr42987_0.o-cp_lto_pr42987_1.o link, >-flto -g > >ld: fatal: file /var/tmp//ccXwdzGddebugobjtem: section >[6].rel.gnu.debuglto_.debug_info: has invalid sh_info: 9 >ld: fatal: file /var/tmp//ccuVJOVbdebugobjtem: section >[6].rel.gnu.debuglto_.debug_info: has invalid sh_info: 8 > > seen during the ld -r -o ccrIZb_ddebugobj ccSerOuddebugobjtem > cc5b3Arcdebugobjtem step: > >ccSerOuddebugobjtem: .rel.gnu.debuglto_.debug_info: sh_info: 9: does >not point >to a valid section > >Section Header[6]: sh_name: .rel.gnu.debuglto_.debug_info > sh_addr: 0 sh_flags: 0 > sh_size: 0x8 sh_type: [ SHT_REL ] > sh_offset: 0x11c8 sh_entsize: 0x8 (1 entry) > sh_link: 5 sh_info: 9 > sh_addralign: 0x4 > > But there's no section 9 any longer. I fixed that in the posted patch for the hpux issue(s). > In the input object (cp_lto_pr42987_0.o): > >Section Header[47]: sh_name: .rel.gnu.debuglto_.debug_info > sh_addr: 0 sh_flags: 0 > sh_size: 0x8 sh_type: [ SHT_REL ] > sh_offset: 0x4434 sh_entsize: 0x8 (1 entry) > sh_link: 45 sh_info: 9 > sh_addralign: 0x4 > > with sh_info pointing at: > >Section Header[9]: sh_name: .gnu.debuglto_.debug_info > sh_addr: 0 sh_flags: 0 > sh_size: 0x3d4 sh_type: [ SHT_PROGBITS ] > sh_offset: 0x7fb sh_entsize: 0 > sh_link: 0 sh_info: 0 > sh_addralign: 0x1 > >* > >UNRESOLVED: g++.dg/lto/pr51650-1 >cp_lto_pr51650-1_0.o-cp_lto_pr51650-1_0.o >execute -flto -g >FAIL: g++.dg/lto/pr51650-1 cp_lto_pr51650-1_0.o-cp_lto_pr51650-1_0.o >link, >-flto -g > >ld: fatal: file /var/tmp//ccvDXoBddebugobjtem: section >[6].rel.gnu.debuglto_.debug_info: relocations can not be applied >against >section [5].symtab > > during ld -r: > >ld -r -o ccyWaCJadebugobj ccNQIWVcdebugobjtem >ld: fatal: file ccNQIWVcdebugobjtem: section >[6].rel.gnu.debuglto_.debug_info: >relocations can not be applied against section [5].symtab > >Relocation Section: .rel.gnu.debuglto_.debug_info > index type offset value section symbol > [0] R_386_32 0x6 0 .symtab .debug_abbrev (section) > > input object (cp_lto_pr51650-1_0.o): > >Relocation Section: .rel.gnu.debuglto_.debug_info > index type offset value section / symbol > [0] R_386_32 0x6 0 .gnu.debuglto_.debug_info >.gnu.debuglto_.debug_abbrev (section) > > I don't fully understand what the linker error is trying to say, but > obviously there's something amiss with reloc section remapping (or > lack thereof). > > Rainer