Date: Tue, 07 Feb 2017 18:10:47 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 216871] www/firefox: DTRACE=on no longer builds on 12.0-CURRENT Message-ID: <bug-216871-32976-b9eUwFt1QC@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-216871-32976@https.bugs.freebsd.org/bugzilla/> References: <bug-216871-32976@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216871 --- Comment #2 from Mark Johnston <markj@FreeBSD.org> --- The problem seems to be related to GNU ld (I had only tested the build with lld) and -ffunction-sections. Two objects that get linked into libxul.= so contain the same weak symbol. There's a DTrace probe in the corresponding function: > readelf -s Unified_cpp_js_src27.o | grep _ZN2js14NewObjectCache16newObjec= tFromHitEP9JSC 747: 0000000000000000 518 FUNC WEAK HIDDEN 152 _ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc11InitialHeapE 1261: 0000000000000000 518 FUNC GLOBAL HIDDEN 152 $dtrace6188451._ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc1= 1InitialHeapE > readelf -s jsarray.o | grep _ZN2js14NewObjectCache16newObjectFromHitEP9JSC 382: 0000000000000000 518 FUNC WEAK HIDDEN 405 _ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc11InitialHeapE 567: 0000000000000000 518 FUNC GLOBAL HIDDEN 405 $dtrace6195329._ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc1= 1InitialHeapE > readelf -s js-dtrace.o | grep _ZN2js14NewObjectCache16newObjectFromHitEP9= JSC 44: 0000000000000000 0 FUNC GLOBAL DEFAULT UND $dtrace6188451._ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc1= 1InitialHeapE 57: 0000000000000000 0 FUNC GLOBAL DEFAULT UND $dtrace6195329._ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc1= 1InitialHeapE With r313262, we emit alises for the symbols. It seems that ld merges the sections, and ends up leaving one the aliases orphaned: > ld -r -o test.o jsarray.o Unified_cpp_js_src27.o > readelf -s test.o | grep _ZN2js14NewObjectCache16newObjectFromHitEP9JSC 1231: 0000000000000000 0 FUNC GLOBAL HIDDEN UND $dtrace6188451._ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc1= 1InitialHeapE 1438: 0000000000000000 518 FUNC GLOBAL HIDDEN 476 $dtrace6195329._ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc1= 1InitialHeapE 1667: 0000000000000000 518 FUNC WEAK HIDDEN 476 _ZN2js14NewObjectCache16newObjectFromHitEP9JSContextiNS_2gc11InitialHeapE However, the .SUNW_dof section has a relocation for this symbol, so the final link fails. I'm not sure if this behaviour is a bug in ld. It seems to me that we might be able address this by avoiding the "$dtrace" uniquifier for aliases of weak symbols. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-216871-32976-b9eUwFt1QC>