Fix link failure with debug info in LTO mode
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 25 Feb 2020 11:34:00 +0000 (12:34 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 25 Feb 2020 11:39:14 +0000 (12:39 +0100)
commit2877ad9ac28e1c7f0a6e643ca8f03f795e0f4985
treeab11b11c923f8fedf71528054fa87a769c656971
parent81ef67c10a3db7d789c7be653dba0a6e6a3e9958
Fix link failure with debug info in LTO mode

This fixes a regression whereby the program fails to link with debug
info in LTO mode because of an undefined reference to a symbol coming
from the object files containing the early debug info.

* dwarf2out.c (dwarf2out_size_function): Run in early-DWARF mode.
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/lto24.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto24_pkg1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto24_pkg2.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto24_pkg2.ads [new file with mode: 0644]