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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The .debug_macro deduplication works by computing a checksum of the ops coming
from certain headers (define, undef entries mostly) and not interrupted by
entries from other headers (e.g. if stdio.h has 10 define/undef directives,
then include some other header that has 20 define/undef directives, then
stdio.h has another 30 define/undef directives, there will be 3 comdat
sections,
2 with wm4.stdio.h.* name (with the hash after it) and one for the other
header).
The DW_MACRO_import operands always refer to the start of such comdat section.
Except for the ignored case of a hash collision, the intended behaviro is that
if  out of say 50 copies of wm4.stdio.h.24.5c1b97eef3c86b7a2549420f69f4f128 one
is kept and the 49 are left out, all the references are adjusted to the start
of the  copy that is left in the ELF object.

Reply via email to