From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id A2C093858C52 for ; Mon, 10 Apr 2023 14:43:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A2C093858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-x42c.google.com with SMTP id g5so8059776wrb.5 for ; Mon, 10 Apr 2023 07:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681137809; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Orl6Hngr5Rbb/xilLaAKC6TGnJgq5J+lQECYHj/bsOQ=; b=lqdKRNJDR0zZlzEJRi/NtLP7OAD0XDnTy+w3oGMRJ/05EokSdkBIQIzP/E0EG6YIbM Ya7dI4qoFe0y7LKxtIKYFjW3BJCDdP6uPbu4WgKyW15JXffP32/S5h9t51XqPBGlxrlN koFvqRXAznNs+YVVe6Ax0AQSdnRYDjU8ULRUglW2H+bHTVF+rSTlQnp8q1atrx6CNSCC LcNUuEOQDcpMjgRUMgcAjSlRv5UxkCFBmpyd1iyUcWi70UbsqDXnBB/tuxmbO6h2XZeI PJxSw09H6hcEElovZXNUb/ZQJE0/snihP6nJBeEURcxOBU139YKs4anJyhrtWo/PQ4df RSSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681137809; h=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=Orl6Hngr5Rbb/xilLaAKC6TGnJgq5J+lQECYHj/bsOQ=; b=CVF3MyI0XmfVqzcenvwH+L7ix/uX/eSfYkF9hnT80xPC67AtmTWK5Y3iOfFt6QkyUD 9przrNKe+BvuuKWQxvo7csbbyl+aKtl5ErCMqJ5+UQ1noH8d7sr/wo3j5RZ9A+72O15g iK2TfDHs5xNF3sSBn/ckItgYSm8VIAXLv5bdIF+X/31jJz/edp3pdgkgDuQQrwwX/ORt KcI+Xdfi2AQOKoYL3CWhhplXEp6KG4TVro8nUpQgQM8L3GC1oSX6XZgy19tBoUTjWi0M VXVB2LGCry5bONDvaTrVbreVhvTHQAjz8WTMDnpA9ukeq0K2Ob64AXwI/go8AHFo5c+m A+dg== X-Gm-Message-State: AAQBX9ffxeBCt7OGzrur0RMqr0FZx1C/LtOlNwyZtqh6HL1KPqgcyd4k FswYKUhstrTRpFUby8IUqRe1sf+hJidAigGtgKs= X-Google-Smtp-Source: AKy350ZLHyAH1jKcBXS4XbKpDUkgzd+obG71NZsHpyWv7ELBJbJmUwvvc23w/UIQiXw+2mQ/Tgc1D2f7GemKeEtS1Tw= X-Received: by 2002:adf:ffd2:0:b0:2e4:abb1:3e81 with SMTP id x18-20020adfffd2000000b002e4abb13e81mr1846192wrs.2.1681137809095; Mon, 10 Apr 2023 07:43:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen?= Date: Mon, 10 Apr 2023 16:43:18 +0200 Message-ID: Subject: Re: Symbol name character restrictions To: Joshua Saxby Cc: jit@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: According to the documentation of the GNU assembler at https://sourceware.org/binutils/docs/as/Symbol-Intro.html, any characters except for the NUL character are allowed in symbol names. Am Mo., 10. Apr. 2023 um 16:40 Uhr schrieb Joshua Saxby via Jit : > > Dear All, > > I noticed that currently libgccjit restricts symbol names for generated > functions (and I assume all other symbols) to match the rules for C symbol > names, that is, alphanumeric and underscores. > > From the source for gcc_jit_context_new_function() ( > https://github.com/gcc-mirror/gcc/blob/725bcdeec60771cb9ee387978716028b64ea1b7f/gcc/jit/libgccjit.cc#L1173-L1177 > ): > > /* The assembler can only handle certain names, so for now, enforce > C's rules for identifiers upon the name, using ISALPHA and ISALNUM > from safe-ctype.h to ignore the current locale. > Eventually we'll need some way to interact with e.g. C++ name > mangling. */ > > I've seen some suggestions elsewhere that some assemblers can handle > symbols with wider varieties of symbols than these, I have struggled to > find any documentation of the exact restrictions on symbol-naming in the > assembler itself (I could assume it's identical to C symbol naming rules, > but I like to be sure), any pointers to where I could find such a > specification? Also, any plans to follow up on the hinted extension toward > the end of that comment, RE C++ name mangling? > > Best Regards, > > *J.S.* > > > > *My PGP Public Key Identity* > > pub 4096R/*B7A947E4* 2016-11-16 [expires: 2025-12-31] > Key fingerprint = *E2C4 514F F0FA 52D1 896A B1D6 3D42 BFD9 B7A9 47E4* > uid Joshua Saxby > uid Joshua Saxby (saxbophone) > sub 4096R/0A445946 2016-11-16 [expires: 2025-12-31]