https://sourceware.org/bugzilla/show_bug.cgi?id=25315
--- Comment #12 from John David Anglin <danglin at gcc dot gnu.org> --- Created attachment 12155 --> https://sourceware.org/bugzilla/attachment.cgi?id=12155&action=edit Buggy patch With the patch, we now get plabels in .rodata comdat sections with same key as the function. However, this creates a problem with local references to the plabel. .section .text._ZN7Dsymbol8isNspaceEv,"axG",@progbits,_ZN7Dsymbol8isNspaceEv,comdat .align 4 .weak _ZN7Dsymbol8isNspaceEv .type _ZN7Dsymbol8isNspaceEv, @function _ZN7Dsymbol8isNspaceEv: .PROC .CALLINFO FRAME=0,NO_CALLS .ENTRY .LVL12: .LFB641: .loc 2 247 21 is_stmt 1 view -0 .cfi_startproc .loc 2 247 34 view .LVU35 .loc 2 247 46 is_stmt 0 view .LVU36 bv %r0(%r2) ldi 0,%r28 .EXIT .PROCEND .cfi_endproc .LFE641: .size _ZN7Dsymbol8isNspaceEv, .-_ZN7Dsymbol8isNspaceEv .section .rodata._ZN7Dsymbol8isNspaceEv,"aG",@progbits,_ZN7Dsymbol8isNspaceEv,comdat .align 4 .LC14: .word P%_ZN7Dsymbol8isNspaceEv ldil LR'.LC14,%r28 ldo RR'.LC14(%r28),%r28 bl __canonicalize_funcptr_for_compare,%r2 .LVL218: ldw 0(%r28),%r26 It seems to me that we have to leave the plabel, make sure it's null when it refers to a discarded function, and suppress the error in ld. Otherwise, the linker would need to patch the above sequence into three nop instructions and a ldi 0,%r28. -- You are receiving this mail because: You are on the CC list for the bug.