From patchwork Thu Oct 26 15:13:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 158590 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp749588vqb; Thu, 26 Oct 2023 08:13:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIvtQM+/NTulRmcMKEpho/YSw98Ba/2e1gN6GaCu1oHAlc0ms1Q7hoVRbvhpmBspLqk3Ak X-Received: by 2002:a05:6359:226:b0:168:e32a:f1af with SMTP id ej38-20020a056359022600b00168e32af1afmr12183194rwb.9.1698333232836; Thu, 26 Oct 2023 08:13:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698333232; cv=pass; d=google.com; s=arc-20160816; b=tpZu00g+b/Me8VGuI+T5+Fv8Rlc/S9ygEtHRTDNyBEerYqnleV59gtt7hRdSEuWY7m iiMHf0+xovEwaq2UWcKBa7t1N1Ony8OfU8eiFjG5xN36en7ksXdTYpPISBZ2+t8/8d2p lpK9p18IjUhwZahNA4h1+QroefM3urZMJPks6/Tc2HX8a18qRzlSq6arAKKQesDiP4sc scUoLzuTEEj+jwHzx01+EGWnpy48ZIe8tVcIW9/f6C477GHLnqG9ngLKJA3r2jitrUZy sCLsQs5MP6JkJ3VXLLEhQ6eaWU0FpaZMBQ3FT+5EzD9duGVIOWWrOzS/il3oe/9yV9Kp odEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=64OGrcKrGb2ES52qymPaZN3CEUqQMVZgjHk66wyE83A=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=D/itLJpvg2N0/aIiwf0duZRraXoN9sqvlL1zpK2b6boZKvRoq/lYebedqEGlXvKPYa q/MoONOar0EM15LhBevhzWBU5b2eR6WjEzQWMvyCtBfoLCBznQxHpdyLPUmMXp50ItWz OrZUg5BR2ojdXyGgKEoC8eHtD8VKqqy4ZokrwxIoJGQvM8q+a6VoyqARnIU8EpG47QcV BuQ9py4Md14wnBa4q6/E02Z2ClpFrc5duUkfWqcPAbL9ldR6EjozID3O+decq8ouWP4o PKf3Mr/bcxSXs7Qmfs4O0fTeWpCWi2ZTOAMicKxhgDYzJuhKwiFzMD2Jk4xa9hTjwL+3 THXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gFlnPaJF; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id dk9-20020a056214092900b0065b227b3f7dsi9397809qvb.170.2023.10.26.08.13.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 08:13:52 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gFlnPaJF; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3E225385DC04 for ; Thu, 26 Oct 2023 15:13:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 9E00D3858D37 for ; Thu, 26 Oct 2023 15:13:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E00D3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9E00D3858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::132 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698333209; cv=none; b=S3CIvazqY7j0sC0CgUbKp8QaJ24V6Lq3C0i4U+ankScgNldW1H93CswNltKlpubVpNtiS3GSBwZ+Opu13/euUpcEUX+qE6SWYvgdGPemDgiDH3pCoLsU58tXfZpwKHIg43+sXGba1Lu6AXbz/ysey0TULRHYQVhXY9pt1SeaS4w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698333209; c=relaxed/simple; bh=TvkOcVaZ+C3mzt/AOrWE+0NZZTk3xGj6eyRjaEU8RGc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=u+qtt2j4U9Dfd/WExWZGKBhabdSkse0RDJQyZcUeU7JcgKDCLODGySjj8t09A//voTTcSyQhSzDJyXNVVvu227dT+msa14a27bzr7Y+cEriOt93RZHF8Qbz5PMRlOwDL0PBt8K1EoU0ij9Wv/ZlJ6DF8ako5iXYP+ZX+7ePRXb0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-507b18cf2e1so1384986e87.3 for ; Thu, 26 Oct 2023 08:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698333206; x=1698938006; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=64OGrcKrGb2ES52qymPaZN3CEUqQMVZgjHk66wyE83A=; b=gFlnPaJFXfGR6uUcaAaZ7BYFPif03yWSrg/SkpzxhqyRvf/j1IIzTSWEuH3uVEh2Kk W02NTfyufLAWoiIu5/F0RtNcZnQPTCLfMCeUXYXhxLmgmengZ9t35dK3Xc94e6ICb4gE PNBS71ExKLtbleZsk21YrjNJ66B+7O5iUyW2Q392tEPZAVFqEq4wznP4B6qWllto9u49 Iq4q1fyXta/CUZ7dtsAccuEXYnMXGk4GzdJT8wpT0DphbbLqyapTdGIoeKw+YBo/Gn5H WOrdTkBtfGQKBnxDs9e1Aiwl72bXL2fbHVsS/4A9t+8FyMHYtHfODo6eI57UjHISNO+H QAiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698333206; x=1698938006; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=64OGrcKrGb2ES52qymPaZN3CEUqQMVZgjHk66wyE83A=; b=gBUF7pvM8v5lU4CCc02gHZaUoQmFwjRQqfxi8Si/iReFSBqw0h1npO3JVJpkztouAa AEOa9yUAehNHWlfmvMjwBO5Zda4cj40T1zo9haE4MOE4ficwKGZVVjklbkufi/e82JMx pdcojcw+Re3GOd2HkdzEVmpDP/WqiVgjHPkbIzMPh73cL8BUT5e3nqxHAS/c3I/lFSr3 3cU8g9lf33LGUADYPKoB6LnpyCAbmzZVt/AlXPFpd0TTIofEl+FA54c1CRitGV6Zr3sq 137yy9CsKYlsBZHC+sEkRz6ZxLaKhn12+XrhbHkeiCmBa7Esi5/c924d9p3V2y2Ucw/9 g1Eg== X-Gm-Message-State: AOJu0YyvzSTxFDK4bWTl+6GHFgCKQze5juz1HVUbOeV8fUnXoBU/sy6U OV8U6F4Cb8rUc1o9ssX8C/K7AUFb4RI= X-Received: by 2002:a05:6512:3f02:b0:508:12f5:f808 with SMTP id y2-20020a0565123f0200b0050812f5f808mr6120583lfa.57.1698333205754; Thu, 26 Oct 2023 08:13:25 -0700 (PDT) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id dj18-20020a0560000b1200b0032d96dd703bsm14510062wrb.70.2023.10.26.08.13.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 26 Oct 2023 08:13:25 -0700 (PDT) From: Iain Sandoe X-Google-Original-From: Iain Sandoe To: gcc-patches@gcc.gnu.org Subject: [pushed] Darwin: Make metadata symbol lables linker-visible for GNU objc. Date: Thu, 26 Oct 2023 16:13:24 +0100 Message-Id: <20231026151324.60267-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.39.2 (Apple Git-143) MIME-Version: 1.0 X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: iain@sandoe.co.uk Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780831468072437533 X-GMAIL-MSGID: 1780831468072437533 Tested on x86_64-darwin, x86_64-linux-gnu, pushed to trunk, thanks Iain --- 8< --- Now we have shifted to using the same relocation mechanism as clang for objective-c typeinfo the static linker needs to have a linker-visible symbol for metadata names (this is only needed for GNU objective C, for NeXT the names are in separate sections). gcc/ChangeLog: * config/darwin.h (darwin_label_is_anonymous_local_objc_name): Make metadata names linker-visibile for GNU objective C. Signed-off-by: Iain Sandoe --- gcc/config/darwin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index b43c8ce97a8..5db64a1ad68 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -868,7 +868,7 @@ int darwin_label_is_anonymous_local_objc_name (const char *name); else if (xname[0] == '+' || xname[0] == '-') \ fprintf (FILE, "\"%s\"", xname); \ else if (darwin_label_is_anonymous_local_objc_name (xname)) \ - fprintf (FILE, "L%s", xname); \ + fprintf (FILE, "%c%s", flag_next_runtime ? 'L' : 'l', xname); \ else if (xname[0] != '"' && name_needs_quotes (xname)) \ asm_fprintf (FILE, "\"%U%s\"", xname); \ else \