Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp581381rdf; Fri, 3 Nov 2023 08:59:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEpIz+xaTY7OwieOQr53XjVub8U33a2qtH3IaS9AOQXvDNHr68UTiMdkqCQXe4jt/Nj6072 X-Received: by 2002:a05:6a20:7346:b0:15e:b8a1:57b9 with SMTP id v6-20020a056a20734600b0015eb8a157b9mr22108472pzc.24.1699027177435; Fri, 03 Nov 2023 08:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699027177; cv=none; d=google.com; s=arc-20160816; b=CXScOZ5lraYwXNsHNNC6UwYZ801/CU6UNnKZtacvi217hjFm/8D5TJh/k6evrEUk4S yIELN1CJZ0ayJYLy2VdlNZ7dRJQPa+q/pd1HhdCPNmkJL/ydXOk3eXK7iAZznC83YyF5 CABMXBdMctTboJ2/xKFoeR1msSHGW6LUjbN1J5uEU0ZAehCEBkIw/qdQF/wBiIBAV9Xm QvEO7KTzGMy4xeczwssFPDD2wm9suz3tUNci2ta3jAJuu3Kfh9FknwKerMtHe1wVzlPw CZ/WKmMQnYStlLvVNu49OadU9QDfsFq+fHHyyyFgHkQsXvfhOz5FEqCeqry90I4nz5ms IcPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Lr0m96YeDDnRICrO7RC5qP0pqUNR/4JctHbSmAUFYHQ=; fh=NvW3CO3GtIHRKW4YFObS4dEX0yL9bbz2APezTtyZGhQ=; b=YvnVnxWdqeirnu5Vl4PVxYmSBwHyk1wCvJoh1mK9xvhfPOXlnuZFBxhTOBArtvOKXb RtmG0kZI2kTxzKDcEgTFsn5yB4VH0wusc7AZ24iYOiVHyi22nE4us9X4xOZWBaruaS+n WdXULyLnvpoOtdDmeaU/VAEpQI45pq1DGVaWXWKuqe0ISEQpQC+ZUYd/wkysGYxL58M6 Di31jrjVLDmg83G0ZiLoZkAzv/Wuy0aoMonDtivcXg0l1yMF9Le0eqMCAFALtZ26BX6q DW5vm4jMvC+YTWwcmidjo/fxH9ocUhXLCrIPGe55968pDIbXaLiXGAhLwrzqb7qI1/wp xzbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id ei18-20020a17090ae55200b0027d29e618f7si1764855pjb.78.2023.11.03.08.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 08:59:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 74DF683C1E13; Fri, 3 Nov 2023 08:59:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344856AbjKCP7f (ORCPT + 99 others); Fri, 3 Nov 2023 11:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344505AbjKCP7e (ORCPT ); Fri, 3 Nov 2023 11:59:34 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39327D5F; Fri, 3 Nov 2023 08:59:29 -0700 (PDT) X-QQ-mid: bizesmtp64t1699027156tvs9nek9 Received: from main2-ubuntu.tail147f4.ts.net ( [202.201.15.117]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 03 Nov 2023 23:59:13 +0800 (CST) X-QQ-SSF: 01200000000000B06000000A0000000 X-QQ-FEAT: znfcQSa1hKbGuZsoOVNlc1WvbvEkFGnTx1nx7spI6Tuzd0sHLnkw7AiMgni3t ZggaII50uNhW4y9QfvuvOyeS4F6auFyNTJw8NQCg+vLjRI5V2SC6LCN9adAn0v67sJ3OSX/ ApylcxyFajCfrERC+YlFJVy8SGFJrBzCX2pVZ4xg8IbilwZDlWfF607cx65tZkc/N5v0pBo 5KJ44BzBG+chXyP6BguFE6wzB2WGXdJq47gbtwJbgnW6dVctfCnU818SNsx7tWsczxLqyqh u4yC+u7f5c5hMGNKdyDBqUc2ZmUsHeTUO2gp5wzAo1jI1qkf08kTw9ItQQe6yQ05zfvbyXV s7UC4ZqDN0fbnt0BzlvuczseCniFWDH+IfzMMqsezOL6Jc3njt6dIop1FXbag== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 3788500215190827511 From: Yuan Tan To: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, luc.vanoostenryck@gmail.com, linux-sparse@vger.kernel.org Cc: linux@weissschuh.net, palmer@rivosinc.com, paul.walmsley@sifive.com, paulburton@kernel.org, paulmck@kernel.org, tim.bird@sony.com, tsbogend@alpha.franken.de, w@1wt.eu, tanyuan@tinylab.org, i@maskray.me Subject: [PATCH v1 04/14] compiler: add unique LABEL_NAME() Date: Fri, 3 Nov 2023 23:59:11 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 08:59:36 -0700 (PDT) From: Zhangjin Wu unique LABEL is required by SHF_LINK_ORDER support. Signed-off-by: Zhangjin Wu --- include/linux/compiler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 5a9cc3209b12..b178f5d51ad6 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -246,6 +246,12 @@ static inline void *offset_to_ptr(const int *off) #endif #endif +/* Unique Label NAME. */ +/* Label is file scope, __LINE__ is enough, and not change in the same macro call */ +#ifndef __LABEL_NAME +# define __LABEL_NAME(prefix) __stringify(__PASTE(__PASTE(prefix, _), __LINE__)) +#endif + /* &a[0] degrades to a pointer: a different type from an array */ #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) -- 2.34.1