https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91228

            Bug ID: 91228
           Summary: [10 regression] Removing gnu_lto_v1 symbol name breaks
                    LTO with Solaris ld
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---
            Target: *-*-solaris2.*

Between 20190720 (r273633) and 20190722 (r273698), many LTO tests started to
FAIL on Solaris, e.g.

+FAIL: c-c++-common/asan/alloca_big_alignment.c   -O2 -flto  (test for excess
errors)
+FAIL: c-c++-common/asan/alloca_big_alignment.c   -O2 -flto
-flto-partition=none  (test for excess errors)

ld: warning: file /var/tmp//cc2LhvSd.debug.temp.o: section [7].symtab:
symbol[41]: global symbol has no name
ld: warning: file /var/tmp//cc2LhvSd.debug.temp.o: section [7].symtab:
symbol[44]: global symbol has no name
ld: warning: file /var/tmp//cc2LhvSd.debug.temp.o: section [7].symtab:
symbol[45]: global symbol has no name
ld: warning: file /var/tmp//cc2LhvSd.debug.temp.o: section [7].symtab:
symbol[46]: global symbol has no name

elfdump -s shows

   [41]      0    0  NOTY WEAK  H    0 UNDEF         

   [44]      0    0  NOTY WEAK  H    0 UNDEF         
   [45]      0    0  NOTY WEAK  H    0 UNDEF         
   [46]      0    0  NOTY WEAK  H    0 UNDEF         

while before there had been:

   [41]      0    0  NOTY WEAK  H    0 UNDEF         gnu_lto_v1

   [44]      0    0  NOTY WEAK  H    0 UNDEF         gnu_lto_v1
   [45]      0    0  NOTY WEAK  H    0 UNDEF         gnu_lto_v1
   [46]      0    0  NOTY WEAK  H    0 UNDEF         gnu_lto_v1

This is obviously caused by
Do not emit __gnu_lto_v1 symbol.

2019-07-22  Martin Liska  <mli...@suse.cz>

        * config/avr/avr.c (avr_asm_output_aligned_decl_common): Update
        comment.
        * toplev.c (compile_file): Do not emit __gnu_lto_v1 symbol.
2019-07-22  Martin Liska  <mli...@suse.cz>

        * config/pa/stublib.c: Remove stub symbol __gnu_lto_v1.
        * config/pa/t-stublib: Likewise.
2019-07-22  Martin Liska  <mli...@suse.cz>

        * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
        Do not search for gnu_lto_v1, but search for first '\0'.

Reply via email to