Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp876896pxf; Thu, 25 Mar 2021 16:40:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8rIqNQ5gkBWRbgXPc8uHmJARR894UEP5fvQ5HCknAnTtqwHMV8d+o6euLgSTAtKCIEO+v X-Received: by 2002:a17:906:eb4e:: with SMTP id mc14mr11972427ejb.169.1616715634760; Thu, 25 Mar 2021 16:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616715634; cv=none; d=google.com; s=arc-20160816; b=ChbIrNVb6RHvAFrM7xHZmRXfN2l1HLYTbRLfZ7yRU8ZI082EhGiL8iiMY7HOh9Bb9d 6ivoseYeGVclBiOKIWhuDScEQRQ67lEbd0uTEWgjEqFcH9pvefL7DpfwY+2Dx/6NEY5P 6vFhUL89LCmoPzXFW8TALX15993VsCyiyNfYjJYOZ5u33raY2Pk2WW50X2KMzbCoWe08 yhNwclAn4fGbkkzvetrKhaROz5LJIyWrVeJQrXMmQbJSN6vZjDnixhi2L4yGh5XlR2xb n5+hZVVa4ycdVhS5yYbfOD+QklYKJ+ChFGg6dyhhgA2037WAVdB9TqNrIzl1DO8Mhl0f GKRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8ub3+KaVHR67U2QACzlICSww+btiIMyI8S4cGZM+QbM=; b=NN2bSxM8w1YAFyEQrSvJ1Ao61ggtCMPJm/zuKgnv0oA3wT/G8Y705RfUWITyU9U7D6 Kvjkkp19CNKg9yLmDJhZvbnhyvwZWeZtdapRyAEkvESevqrks9A7DIkap2EAnjBHUO5v Gblf41G2UBDdRzJphfv4LZHbRjo6CnVwGw9WB3UJf+cqTliIP0kzBaucDQ9pHLTAa7Qv cJovF1U99o+5c1dNNj0ghHg9ZwTlrsyVaqccDOh200x2yrz6EwWehASt8l4ScAb5MBPJ AMigSK3HT8ibePzXtWD/wMMTG28d7X2tP53VIScp6Ri4o6ocw129XGkpNCkIYU4BZ+nD hx4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YNP3csUt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si5549676edc.65.2021.03.25.16.40.12; Thu, 25 Mar 2021 16:40:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YNP3csUt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231191AbhCYXhO (ORCPT + 99 others); Thu, 25 Mar 2021 19:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231397AbhCYXgp (ORCPT ); Thu, 25 Mar 2021 19:36:45 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FF5BC06174A for ; Thu, 25 Mar 2021 16:36:45 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id c17so3642213pfn.6 for ; Thu, 25 Mar 2021 16:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8ub3+KaVHR67U2QACzlICSww+btiIMyI8S4cGZM+QbM=; b=YNP3csUtke1uWeppGyLz3d/mgtKAW3dwkcruzfL+2fTZ9nCh9raBIGfyKTsPQgdbdd RNO3cYBsYF4/4yjZ7h+dF05qxq6/lb7hjDmm1od/dg7dmW9SUazvNNUWdtSarZhh4oMR bhf2VaYwkD+R02AHCM41L9lJSqs+Ha24dbFD2A3iTZjx/hNHeYjXQ5vdY5crbT+w8cu9 N//W8D8jy2WtBCkYL9naqXhCCF+dCQxR/lKsQtMnq4Ml38nim+7M7y8QzDZ5NmgdwDKa l+jMnJE3i38tUeQfjk4F7KAMwYzbtIqpLpwqLlCLrkzo1p+9Mlk2SEAZqwbiuok83yQy RF3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8ub3+KaVHR67U2QACzlICSww+btiIMyI8S4cGZM+QbM=; b=YiH/Eo9A14+k7maJJEjfqvkO4zmm70YSYwEGJzE6TeL5yJd9rHthy/q245Bj2zk60F mtALrqLE02YGzEYodzO9DyKIBD43GHu/G3ho3UVFrk6vdfFm4XErMX1yV76pF23yRTQk aIoccDiV1CKn8UfLg2E2oWkRHCo80A2Cmea6mV7PmyyfN3OE3ETYJqmcC6VVvBPK0foY OX9irmSSVtQ78y4nA841XZsuqL+giXZfhn+rBNVpPVp+eK+/tPKATE6RguaG/F0jEegH IgwFmKXTmGMUpiNz05gV41yZ4xy5vXAy+Gmp1PVXwduuHahaJOnPhfMpcejnN+11Strf 70dg== X-Gm-Message-State: AOAM532kSclkQqGBH84ZxAc0TpVA14wicDKkEsGil+KeHaCAyVCP7EEf Xj+eosWbWKNaH2rYtPjmZSIXxA== X-Received: by 2002:aa7:942d:0:b029:1f2:cbc6:8491 with SMTP id y13-20020aa7942d0000b02901f2cbc68491mr10125053pfo.53.1616715404666; Thu, 25 Mar 2021 16:36:44 -0700 (PDT) Received: from google.com ([2620:15c:2ce:0:1532:a374:78cc:c35c]) by smtp.gmail.com with ESMTPSA id j3sm6263561pjf.36.2021.03.25.16.36.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 16:36:44 -0700 (PDT) Date: Thu, 25 Mar 2021 16:36:40 -0700 From: Fangrui Song To: Nathan Chancellor Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, stable@vger.kernel.org Subject: Re: [PATCH 1/3] scripts/recordmcount.pl: Fix RISC-V regex for clang Message-ID: <20210325233640.jzi7uvaohvqwixiu@google.com> References: <20210325223807.2423265-1-nathan@kernel.org> <20210325223807.2423265-2-nathan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210325223807.2423265-2-nathan@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-03-25, Nathan Chancellor wrote: >Clang can generate R_RISCV_CALL_PLT relocations to _mcount: > >$ llvm-objdump -dr build/riscv/init/main.o | rg mcount > 000000000000000e: R_RISCV_CALL_PLT _mcount > 000000000000004e: R_RISCV_CALL_PLT _mcount > >After this, the __start_mcount_loc section is properly generated and >function tracing still works. > R_RISCV_CALL_PLT can replace R_RISCV_CALL in all use cases. R_RISCV_CALL can/may be deprecated: https://github.com/ClangBuiltLinux/linux/issues/1331#issuecomment-802468296 Reviewed-by: Fangrui Song >Cc: stable@vger.kernel.org >Link: https://github.com/ClangBuiltLinux/linux/issues/1331 >Signed-off-by: Nathan Chancellor >--- > scripts/recordmcount.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl >index 867860ea57da..a36df04cfa09 100755 >--- a/scripts/recordmcount.pl >+++ b/scripts/recordmcount.pl >@@ -392,7 +392,7 @@ if ($arch eq "x86_64") { > $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$"; > } elsif ($arch eq "riscv") { > $function_regex = "^([0-9a-fA-F]+)\\s+<([^.0-9][0-9a-zA-Z_\\.]+)>:"; >- $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL\\s_mcount\$"; >+ $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL(_PLT)?\\s_mcount\$"; > $type = ".quad"; > $alignment = 2; > } elsif ($arch eq "nds32") { >-- >2.31.0 > >-- >You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. >To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. >To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210325223807.2423265-2-nathan%40kernel.org.