From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id C56EB384AB58 for ; Wed, 24 Apr 2024 14:26:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C56EB384AB58 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C56EB384AB58 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::f30 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713968778; cv=none; b=a6IUFCMa7zONLun3W959SnrqIGNcvC8hEdXcppxDFlozM7FQ/im60CsW5Act0HEJeqVMJhLYyAVNmIA21++fUVSYDTNA+k5ssFIUj0nWc3ZNeCQSlRNoJm2N34PJux6EYJ9c4YF7Exs5pe3750WM3BLHqXyGiDxFJHES6M2BTJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713968778; c=relaxed/simple; bh=vjG2YzcOs5gqEdM7GF6KTc19WUncDc+JTe1mIIPIzUI=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=AqekTNWC9BqK7wHAMAEWTehWqiQH31Drr7BN8PPyahZq4Ibx7YZ9mG2T01xTqtxprx1U+Wak3KeW6bIlzsChMqclBSjTAorTRt42UTMOhxr9j1IoZI/o3CdAed+3B0czazzQ4ZBDmSMov6rzzAzbeFruu7DNLfgetrqh6+0i3tU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-69b59c10720so27857186d6.3 for ; Wed, 24 Apr 2024 07:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713968774; x=1714573574; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vjG2YzcOs5gqEdM7GF6KTc19WUncDc+JTe1mIIPIzUI=; b=bXzl1m3WT3CZS+2jgWE4yu0LRiqLowRBiZYAGG0i9uwO4IAHJ1jKeipmTj6zYMRho9 iuzjAVrUdl9VOeuIuOEkzmdP586TMksbPuy8pd8aN6yVbgk04uMAht0zQQCQBcDRngSB ojaUXzi0ZG+v6wKDK28lVyDuJXaczPxAtrFJDOWxjz0ZLGFrCV+uQkS6iNaLsboyOO/Q Lb5/TskrnZ9cXDnIquN3ePTaB2iC6FY270i5042g18UwhazUfGy8NKWvRMs2LBpJYHKg NCaIPD3/jvIuGuHuqiUn/ZVBsDO/ZtjsniETWI2asOCWFqbUpcjcDlM6S/oAo9fi7x/9 hlUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713968774; x=1714573574; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vjG2YzcOs5gqEdM7GF6KTc19WUncDc+JTe1mIIPIzUI=; b=vW4/noSNxnOvtir0Mtw/HIewDQEz/O99e95hL99wgRXV2Ke0QKGz3Bua5BZGO19Zku RbNS4oIkFA1FQ66NK/jgNYspo3MKrmRMyR8lPP5hNigH85neI6zgd228mJkJdJUCE+Ne 0ziAYYUe+aBWVqpXt68wRpnBDh8W/hzs5WP46Vq24nCtpWl0ZDyCeakBarCuGeWuc4Fj WcYjBXyCnXjrrZK0nyGVAxcD2UquPLULMwvRGOE9/n+4o/Ea6+ooq5jzn0/mCn9j6tqI 7FZRtgJe8I39Fyw3WQysryq/97qlVOwUN7xHUI8ssCZ1A6RMjiT+26lfXMDKfkxz6qSp NEmw== X-Gm-Message-State: AOJu0Ywl0gc6/SizvQs4i4mG+FIbCifZ4JUBQPr47iZomObNSB9gvYuf Y8ceiaTjeBIRBQUbA48cknTuU4v+5U6TwZEu3UpzAzKYKvPtTrqHp4vND4i222iaa5yYtm5wQGx QNXD9GeRKdspmLkZ4icxWoeZ0Z/veRlv9H54yh8TdrIIyO+FpjrF7AdI= X-Google-Smtp-Source: AGHT+IGKsYP6K2dNSiFL1pqQCOv5RJbTsigX7MY2pHP8HcUBDhDDvqkcr+bDKRfui/N54a8Iv9zb/hciYDCodvEZ/dc= X-Received: by 2002:a0c:d80f:0:b0:69b:66b9:8d79 with SMTP id h15-20020a0cd80f000000b0069b66b98d79mr2516856qvj.15.1713968773583; Wed, 24 Apr 2024 07:26:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: enh Date: Wed, 24 Apr 2024 07:25:57 -0700 Message-ID: Subject: Re: Maybe we should get rid of ifuncs To: Zack Weinberg Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Apr 24, 2024 at 6:56=E2=80=AFAM Zack Weinberg w= rote: > > On Tue Apr 23, 2024 at 2:39 PM EDT, enh wrote: > > one thing i think is interesting (having been looking at ifuncs while > > adding riscv64 support to Android) is that afaict bionic [Android's > > libc] is basically the only current user. every library i'm aware of > > (and certainly every library that's part of the OS) does _not_ use > > ifuncs, if only because iOS/macOS has no equivalent (and Windows > > too?), and if you've got to have the manual function pointer > > manipulation implementation for them... > > I assume you meant "every library that's *not* part of the OS"? no, for the OS [except the already-mentioned exception of libc] there are _no_ ifuncs. for apps, well, there were none in a _sampling_ of popular apps i did, but doing a complete survey of all apps ... well, there are a _lot_ of apps. > > that said, for llvm at least there's work on function multi-versioning > > where the compiler basically writes the ifunc resolver. but (a) that's > > not quite finished yet (?) and (b) i haven't seen anyone _use_ it yet > > and (c) is at least by definition of being machine-generated pretty > > regular. > > Do you know where to find the llvm work in progress? the docs are here: https://github.com/ARM-software/acle/blob/main/main/acle.md#function-multi-= versioning https://github.com/android/ndk/issues/1909 implies that -- despite the "beta" in the docs -- enough code might be in llvm and then downstream in the ndk that arm64 FMV is now usable. (but as i said, i haven't used it yet, and i don't yet know of anyone who does.) > zw