Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp202909iob; Mon, 2 May 2022 17:06:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxI0GCtyMVnbaU5B6iImjyHVPzRTw/qyi5C82wOzIZvNrDDapmhS5/JEbwJ5JI0fWfX+KE6 X-Received: by 2002:a05:6a00:1596:b0:50d:4bc2:467d with SMTP id u22-20020a056a00159600b0050d4bc2467dmr13625061pfk.44.1651536389147; Mon, 02 May 2022 17:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651536389; cv=none; d=google.com; s=arc-20160816; b=vAv9Y4cfFZjs8eV8XRmh+nsYoS5uOHdccWFvF6aTqGg8dfYnoo0lOdhREPWo+w4VJB OIpH6SdJB7p12iEcPEGtUIsjdX/6abA4MRbysHVuGVIXNbXEngVD8UPNliAHQJLlYkum lT6Y333+Jbh76ClVa9BZF9Qo3R2Fun4BDkGh1WYgkWd5Rf7fVXWddzGeO7/8bjLIFLeF jRnyfx0hE6xUNJKCyzBpZop7kivgdrpFQJg2vBH4rl5oYCPhpjcpMjJHWLJWMhy1DqMf wy8L2LA8aQt6rQOwVStT0XKylKtKW8iOs/rkP0WAcdxnT+WxL2xg1uRPwPj935wague/ ndBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KKhtdiXBhaTQ4hxTf9h/JioXzWKd+xspA+ExR0T/yjc=; b=UrbPeIQkTWY7BYoA2aCerUSWlmFIrVNEAcu3+rYlGuRKNnT5ws38SBJfqiD2sLbPGk Hu1z9est5JqfGDmEHdTy2LQHknviTEDLqFz4b6t+llqQR+3Cu5jjR1boZWRoYIfXANYO fYI1GqYu3gx6A2BaFMLAe8XUXrlUTeCwpJFsAT3/vKQgU94yAAzdplIJlSLLiZhQmKZk Cnbs0GUIemwHXUe/BT/neEtuZPPEMW4eO1hmtgSXwlzyg5vlutcRnHgaDlhnbXg7CoKI RV1hUISfQkJS/bC2/VYDpBu/mtkLRVty15LpeiEr7H9edxfuGcHCE25Rd8xXiAurrZXV DO7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=tEYpKdC2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d3-20020a170902cec300b0015eaa9783ddsi3488785plg.532.2022.05.02.17.06.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=tEYpKdC2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 18A3F35AAE; Mon, 2 May 2022 17:05:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235913AbiD2VKb (ORCPT + 99 others); Fri, 29 Apr 2022 17:10:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239194AbiD2VKR (ORCPT ); Fri, 29 Apr 2022 17:10:17 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A97CF90CD7 for ; Fri, 29 Apr 2022 14:06:58 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-2ef5380669cso97630207b3.9 for ; Fri, 29 Apr 2022 14:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KKhtdiXBhaTQ4hxTf9h/JioXzWKd+xspA+ExR0T/yjc=; b=tEYpKdC2td7yT5/yYFiiREZeI36nhl7Oj+7G9V7HZsQ5hjWFZlrlWvC9CtOBXsK7ZG +mxtyGQArT6V7IqIIzXnAVBH72a9JR2JmZO2/9zObhJzg3/Cf7NYf6kBDQDV08PpWZnN uCAGISnBL0zGcCD1TVet1x69GS3xCNVIk+iBPXip5l5P6Foh4B5k/1MTG7b4HFzQreHJ /KpjzJFwM9kxulWQBu1uiOGKSLL3Nold5mQFzy+xylrcsJgsFhTSHIWH0xhqpmjxpHg1 rGQmRBH4nX7ie+KWJy4e6q5J/xul720DvSVfdM85td93O5XwB4NyW/kO7y+8+5mccw3/ /bMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KKhtdiXBhaTQ4hxTf9h/JioXzWKd+xspA+ExR0T/yjc=; b=Zi1YREi3FRr3A86OXMd6xaVlmF+b3UGfKMlppfYTCzcBR6cPOe+10SE9nK/ceN/X6Y LYhvRD/VKLZZ6+tgbv1O+8QSYBklv2EO6MyHUckcGcQi7ih8A9y9RVEbWyekGuWf64hP 3kk98vEKHWEONMApMSQ3ClUPVOWrlwGWAx6pFWvQkgu4T/7U1Dg3MUTjMug53Uj6Zu2I 3odjSjaZ91EZZcqlHuHGMd0SGYBpgnsNYZLHGaObc75ZMCKLLHdnfEJa08Tj6LzEteUX ADpkXAl2/E41sPKB2d9zPVcFYYbsQPehdfb21nG3ktpt4H7EH75SUdNiPTjcAlEJeGRh d56g== X-Gm-Message-State: AOAM5336c1pynyeAFE56u6AXg/58dL7yPKyrf6rKLvgKYPUsPJ52/Bhp UwWHqjxAzsgI2KamqL25ql+882fGv6B9c6iQjeszBw== X-Received: by 2002:a81:5689:0:b0:2f7:c73a:1724 with SMTP id k131-20020a815689000000b002f7c73a1724mr1235585ywb.299.1651266417783; Fri, 29 Apr 2022 14:06:57 -0700 (PDT) MIME-Version: 1.0 References: <20220429091859.GS2731@worktop.programming.kicks-ass.net> <20220429201249.5hjcutds4wmkhemr@treble> In-Reply-To: <20220429201249.5hjcutds4wmkhemr@treble> From: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Date: Fri, 29 Apr 2022 14:06:46 -0700 Message-ID: Subject: Re: [PATCH] linkage: Fix issue with missing symbol size To: Josh Poimboeuf Cc: Peter Zijlstra , x86@kernel.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-toolchains@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 29, 2022 at 1:13 PM Josh Poimboeuf wrote: > > On Fri, Apr 29, 2022 at 11:18:59AM +0200, Peter Zijlstra wrote: > > > > Occasionally, typically when a function doesn't end with 'ret', an > > alias on that function will have 0 size. > > > > The difference between what GCC generates and our linkage magic, is > > that GCC doesn't appear to provide .size for the alias'ed symbol at > > all. And indeed, removing this directive cures the issue. > > > > Additionally, GCC also doesn't emit .type for alias symbols either, so > > also omit that. > > > > Fixes: e0891269a8c2 ("linkage: add SYM_FUNC_ALIAS{,_LOCAL,_WEAK}()") > > Suggested-by: Mark Rutland > > Signed-off-by: Peter Zijlstra (Intel) > > Acked-by: Josh Poimboeuf > > -- > Josh > Yeah, an alias inherits the original symbol's st_size. In case you are interested in the internals, see https://sourceware.org/bugzilla/show_bug.cgi?id=29012 ("gas: .set should copy st_size only if src's st_size is unset")