From owner-freebsd-questions@freebsd.org Sat Mar 30 04:57:10 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 276691563A83 for ; Sat, 30 Mar 2019 04:57:10 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BAC66E91D for ; Sat, 30 Mar 2019 04:57:08 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.193.229.77]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPA (Nemesis) id 1MFslN-1hAs4J0Brz-00HQ6n; Sat, 30 Mar 2019 05:57:00 +0100 Date: Sat, 30 Mar 2019 05:56:59 +0100 From: Polytropon To: mayuresh@kathe.in Cc: freebsd-questions@freebsd.org Subject: Re: Why very little documentation on "ifunc"? Message-Id: <20190330055659.7a816d84.freebsd@edvax.de> In-Reply-To: <4ab839e063955c1d3fa3cfca312ef29d@kathe.in> References: <20190330042940.ed91d5f6.freebsd@edvax.de> <4ab839e063955c1d3fa3cfca312ef29d@kathe.in> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:bzLfAdLEwGAToNYww2TIgLD3WpntnkB0s1v5qbxVVI2KD5xw6XV N8uihGeF3gLpMIpRvONy5mybHc37DDYSX/nC/psOKvXlJUN/0A/1YPq2iTmFTZmD1D3Wo+r YR0hPgxJL/qVHUQVao1hy+s3Gy0mO65UaZRN2S8rIO/8InVJ2h21gIj5k6opEsrtXslxamp nbbgD4MaBwFkgoF//rCTA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:KNzzARsDDjg=:E8se0HWgYLII7KHWo5d3qz yZrPYVZTvuvY+2UUSU1rsR7ZLTYGUW/fMx9PAIn9oSZJHX253vhdKf7Xvo9r3Doga8zKuGbzV kmSZrF98pXIPEzisFy7/CPpTfAF9+iH+4ZRCmPp24cv0xZsQ05uVHoJLSmkmpnaUYC3IEsluq Kz8/aat+2hjTWSfqSFbuFvIfiKZWejPVtOwnioJylMfA0HBKVZnGvFJ5j6uK7HXQ/l3wtFFOG 0jrTzU5io3gmq874YQZZOCLhcUsVCA9JrmkvyJsPhCCvJQm1/74lNX0KTUz3AEqie2+gegqPY eDVaT/mLfPatVWE412Ckxss3Kv56QaKOQ1BqiJroRNokalZHZ5SG/TM9q820XphYEKYWabNS5 lIbxKAqB1uhY9ExEW32UfvwRYGPiG9Il0g1b+r4Q4nSJ0UDH92V+Ix1JHED7MAXP8q0xtnO/m wOv0Zknk5g8KD43WhTJNd1uAx0JwHgvPTX96Wcmbw+DFXUAF+a/HkEMqPvE4Gc6n0vZ7Q9f39 vFJBX0htH98z+R6FquOUyMeK/h3hk1NefjKxMBdy5w2D58n2LZUn6fA85kX+pYrEW6xKi2U0S XgOSFZ9F+cdFIlX00R8KA0yCpzjGy4Hs/lGxPU1lGx7G5N/wQ/zigO6Qq+uRZNADDKRqxk+1Y BVSqlL28ANA9XtkTMshqQzQdGBepVWmEZpzW1iYzmi2pWRn4n9VR7MgtN9ptnWD66/4QN0QUv IZc5brHeHGGHdNxlrMcf2BO2bEPbMGMXrDMV1lodLajeGrmm+ylUuVuDJmU= X-Rspamd-Queue-Id: 4BAC66E91D X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [5.54 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; MV_CASE(0.50)[]; IP_SCORE(0.24)[ip: (-0.48), ipnet: 217.72.192.0/20(0.10), asn: 8560(1.59), country: DE(-0.01)]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.01)[cached: mx00.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[77.229.193.92.zen.spamhaus.org : 127.0.0.10]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.05)[-0.052,0]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.96)[0.964,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.995,0]; RCVD_IN_DNSWL_NONE(0.00)[74.192.72.217.list.dnswl.org : 127.0.5.0]; MID_CONTAINS_FROM(1.00)[]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2019 04:57:10 -0000 On Sat, 30 Mar 2019 09:39:35 +0530, Mayuresh Kathe wrote: > On 2019-03-30 08:59 AM, Polytropon wrote: > > On Sat, 30 Mar 2019 07:28:23 +0530, Mayuresh Kathe wrote: > >> Ever since I stumbled upon "ifunc" I have been unable to find good > >> enough documentation regarding it under FreeBSD, that was till "Ed > >> Maste" pointed out; > >> https://jasoncc.github.io/gnu_gcc_glibc/gnu-ifunc.html > >> > >> "ifunc" seems to be a really good tool, wonder why it isn't as well > >> documented as rest of the stuff under FreeBSD. > > > > From what I see, ifunc is part of GCC, and FreeBSD does no longer > > use GCC as the system compiler (after switching to Clang/LLVM). > > The case for ifunc documentation therefore has to be discussed > > primarily in the context of GNU development tools. > > > > https://sourceware.org/glibc/wiki/GNU_IFUNC > > > > Of course, Clang/LLVM also has (limited) support for it: > > > > https://clang.llvm.org/docs/AttributeReference.html#ifunc > > > > So this is nothing FreeBSD-specific which should be covered by > > OS documentation in the first place. But it could maybe find a > > place in the FreeBSD Porter's Handbook. > > Not really, as "Ed Maste" had pointed out to me, "ifunc" was only > _designed_ by GNU, the "ifunc" implementation under FreeBSD is > completely native to FreeBSD. Yes, that is correct. As I said, it originates in GCC, but Clang/LLVM implements it, partially: Not all targets support this attribute. ELF target support depends on both the linker and runtime linker, and is available in at least lld 4.0 and later, binutils 2.20.1 and later, glibc v2.11.1 and later, and FreeBSD 9.1 and later. Non-ELF targets currently do not support this attribute. So current FreeBSD has the required support for this mechanism. > It's sad that an advanced technology such as "ifunc" is not even > documented in the Developer's Handbook. True - it should at least be mentioned there, and including some links to the relevant documentation of "the two big compilers". -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...