From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by sourceware.org (Postfix) with ESMTP id E67E23858D34 for ; Wed, 21 Feb 2024 13:32:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E67E23858D34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E67E23858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4190:8020::34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708522378; cv=none; b=eDTZS1n2fFcH5zWy7SHs02uHgMVfkYxa6rWDKzG+hE7H2mwVY8XdpZt3sXxaUC7AFfri54oHovd1vRkG2Z+b0P9XdBrIac4PktcmDa147kDpwVbIKHb9KrUgyDkbKFx9Peij/9bdVE/V9OGmrWYsJyLyijRtZiFzPVyPXD+jkUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708522378; c=relaxed/simple; bh=u7QXSDxbVaNgzpOv+iIZR1Kgsh7h+d2tvUolMLlV2wY=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=MXEXSMWOYxGs/X6S9HJ0IhiC4dXAbEs3+JniltbVhc8Yg/gNZ/INwBTXrEYK2hL1Aso0LOi/wO8S5va6KelTHg8U2pvCNKZZdyrdVO0jrVuFJWsl1cnNfelh+WuycQKoLIgPU4IrhNYLv6L+JmmC5XUS5soXem3pjw+4aJ8Mf0s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by angie.orcam.me.uk (Postfix, from userid 500) id E948892009C; Wed, 21 Feb 2024 14:32:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id E31EF92009B; Wed, 21 Feb 2024 13:32:48 +0000 (GMT) Date: Wed, 21 Feb 2024 13:32:48 +0000 (GMT) From: "Maciej W. Rozycki" To: YunQiang Su cc: Nick Clifton , binutils@sourceware.org, xry111@xry111.site Subject: Re: [PATCH] MIPS/Gas: Support .L/$ as the mark of local symbol In-Reply-To: <20240205101427.2862503-1-syq@gcc.gnu.org> Message-ID: References: <20240205101427.2862503-1-syq@gcc.gnu.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3488.5 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, 5 Feb 2024, YunQiang Su wrote: > In as.texi, there are lines: > A local symbol is any symbol beginning with certain local > label prefixes. By default, the local label prefix is > @samp{.L} for ELF systems or @samp{L} for traditional a.out > systems, but each target may have its own set of local > label prefixes. > > Let's support it for MIPS: > 1) For OldABI, GCC uses "$" to mark local symbols, and > for NewABI, ".L" is used. So let's support both for > OldABI, and ".L" only for NewABI. > 2) Emit an fatal error, if a local symbol is used, while > not defined, just like LLVM does. I gather you want to avoid a case of an undefined reference making it to output for a symbol whose name suggests its a local label, right? But that seems like material for the generic part of GAS rather than the MIPS backend only (and then specifically SVR4 PIC only and not non-PIC or VxWorks, according to your code as submitted), so that all targets behave consistently, and I can't see e.g. i386 GAS doing it. So a question raises: what problem are you trying to solve? Can you give us a piece of code that you think is handled incorrectly by GAS, and why? Maciej