From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 67CCD3858C2A for ; Wed, 17 Jan 2024 06:52:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 67CCD3858C2A 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 67CCD3858C2A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705474353; cv=none; b=UEh7ZGEmo8tZLOhWNOGpE4WWtqndIPOwJE0okRdyLHHGfACgMbraBPGaOlrTm2d19bfU5RoGDl9gsSxaXhwWpdhPG/2KX6s5GtzmzZeDCbSz0W9NjdkZ1FWG76AIXLibrGbAX5CluakVcDnCnz29jy91abtkjo1mCm5yOx774Hs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705474353; c=relaxed/simple; bh=rI2gl+SAdmdOUQjFw2kNl369nWA/EHcqC466ZiFit3M=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=T6JZIyp3m1dKkPJLaKtdxGdR6BlFgxOaeJ5bFPEIxR39rz7KV+/NBl91HIlx+3RCIcPema0Jm4ojHFLVvoYW0OXusf7DQBpEqomYWSQRvloJiQcZ7CtnEIHun4stI6O3761mMUt8ZXBVoai6cxg/zv5txGmXW8w93PjZou3nh6I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2cd2f472665so112541111fa.2 for ; Tue, 16 Jan 2024 22:52:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705474349; x=1706079149; darn=gcc.gnu.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=eO8aR3SPwS4a9MXNt8rvkh9Pt0crbSVwDXIxc0SkVjI=; b=OfEtYzZFleKRgDZ6RxOJ4ajfXuGESvPPhZRsc5JKU3nP+5SsJRFI/CUAQCnzDUgtaj Fwj+8bM39CeVKTfET3BaC2fscDIndPU5puffLJAcxCyYW3Ff0PeaNbllpcPh5Ql9Fqvq jmDG6dhAWs+8We2l7o/HF3xGe9uQhhndi4aXFnQHpf9EWh556oC4isLwv2Bi+3eV5O3U y2jhoYFLMZ36ihhQCrYeIqMAcq4tbKSVNkYg6MHP6cdaxfcIdOE0DbxmX7lSKZDidM1e Zbfg43fT8TA+xim4xuckR7kgXVpvPIYhCkDKMTy5HwQFUzTD47js+B+cbif1BRkWjKB4 ubeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705474349; x=1706079149; 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=eO8aR3SPwS4a9MXNt8rvkh9Pt0crbSVwDXIxc0SkVjI=; b=Cmty/GAej8vkAP1EZIxSt1SWQIGn6IhlxWk3gCphjq/aJnvbU2EFN+pEzHWMGRiL0C WZ3hxGxMtxH9AtNa+ud4dSqHomT4YOZVFwfzahROy+8dFje6pAV6aKOi9YLyQdF7qgvq S7jX/wWiVEIaeGLIqCkyTo3rE+Zlfhs8WROnOeYcXGNR4YBLqNu0tW8Ma8A0T3m9m/sH CBJbfEXNTemm4GeIZbDErHlUpmaCr55j3pkmU5hJqrA7iZJpMHcy65kMALmL6YwzCn3W 3tURY+V5W7Pkv0TesmNx6bNTxT6cTig/KHb2+smpm6weujnN29LjSsH9lRax8e3QDClB 0dsg== X-Gm-Message-State: AOJu0YyjwWH41exgtILQZqez3qHeDSUDpjaMiY4Ab0XYbJONs/n5/hJb QRHF2ZctKog1ludKSaadk3nMF9B7RLTn5y0QTMY= X-Google-Smtp-Source: AGHT+IGWxbDfhd8OZs0VrKyh7/Fizw4er2S8+5/AN4quqZOLBK63zuDbdfQDBjrhO3AVyflgTNIv3Xo/S+LxKTyFMNo= X-Received: by 2002:a05:651c:150c:b0:2cd:a2e9:c7db with SMTP id e12-20020a05651c150c00b002cda2e9c7dbmr4833355ljf.89.1705474348637; Tue, 16 Jan 2024 22:52:28 -0800 (PST) MIME-Version: 1.0 References: <20240116150016.3471-1-iain@sandoe.co.uk> In-Reply-To: <20240116150016.3471-1-iain@sandoe.co.uk> From: Richard Biener Date: Wed, 17 Jan 2024 07:52:17 +0100 Message-ID: Subject: Re: [PATCH] lto, Darwin: Fix offload section names. To: iain@sandoe.co.uk Cc: hubicka@ucw.cz, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.7 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,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 server2.sourceware.org List-Id: On Tue, Jan 16, 2024 at 4:00=E2=80=AFPM Iain Sandoe w= rote: > > Tested on x86_64 Darwin, x86_64 Linux. > OK for trunk? When? OK now. > thanks > Iain > > --- 8< --- > > Currently, these section names have wrong syntax for Mach-O. > Although they were added some time ago; recently added tests are > now emitting them leading to new fails on Darwin. > > This adds a Mach-O variant for each. > > gcc/ChangeLog: > > * lto-section-names.h (OFFLOAD_SECTION_NAME_PREFIX, > OFFLOAD_VAR_TABLE_SECTION_NAME, OFFLOAD_FUNC_TABLE_SECTION_NAME, > OFFLOAD_IND_FUNC_TABLE_SECTION_NAME): Provide Mach-O syntax > versions when the object format is Mach-O. > > Signed-off-by: Iain Sandoe > --- > gcc/lto-section-names.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/gcc/lto-section-names.h b/gcc/lto-section-names.h > index a743deb4efb..1cdadf36ec0 100644 > --- a/gcc/lto-section-names.h > +++ b/gcc/lto-section-names.h > @@ -25,7 +25,11 @@ along with GCC; see the file COPYING3. If not see > name for the functions and static_initializers. For other types of > sections a '.' and the section type are appended. */ > #define LTO_SECTION_NAME_PREFIX ".gnu.lto_" > +#if OBJECT_FORMAT_MACHO > +#define OFFLOAD_SECTION_NAME_PREFIX "__GNU_OFFLD_LTO," > +#else > #define OFFLOAD_SECTION_NAME_PREFIX ".gnu.offload_lto_" > +#endif > > /* Can be either OFFLOAD_SECTION_NAME_PREFIX when we stream IR for offlo= ad > compiler, or LTO_SECTION_NAME_PREFIX for LTO case. */ > @@ -35,8 +39,14 @@ extern const char *section_name_prefix; > > #define LTO_SEGMENT_NAME "__GNU_LTO" > > +#if OBJECT_FORMAT_MACHO > +#define OFFLOAD_VAR_TABLE_SECTION_NAME "__GNU_OFFLOAD,__vars" > +#define OFFLOAD_FUNC_TABLE_SECTION_NAME "__GNU_OFFLOAD,__funcs" > +#define OFFLOAD_IND_FUNC_TABLE_SECTION_NAME "__GNU_OFFLOAD,__ind_fns" > +#else > #define OFFLOAD_VAR_TABLE_SECTION_NAME ".gnu.offload_vars" > #define OFFLOAD_FUNC_TABLE_SECTION_NAME ".gnu.offload_funcs" > #define OFFLOAD_IND_FUNC_TABLE_SECTION_NAME ".gnu.offload_ind_funcs" > +#endif > > #endif /* GCC_LTO_SECTION_NAMES_H */ > -- > 2.39.2 (Apple Git-143) >