From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by sourceware.org (Postfix) with ESMTP id 2FD3C3858D33 for ; Wed, 21 Feb 2024 12:59:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2FD3C3858D33 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 2FD3C3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=78.133.224.34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708520362; cv=none; b=oSwORqldcl46U0fpgj6uyBNXu3Yw8u8qA4cTjKV1+cDoEXfCXnU1Ybpy3YO7nE/pbdBniGCkXHglhzO30X3zysSLlm2nKafxBJZOrpdqgafgDfDhzBPZUQ2Fgx234pQVtJ4FbrQI+mjc5w4cbUdgpcfErfTKeXhzSKAE9fb49pE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708520362; c=relaxed/simple; bh=F2UG3YiskAX5Vn+yHkHxYNLs0nGKdmx+XJPZiBdVDhQ=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=OdFmM5S3G4QIJVZF6H5yfusDNhLEcppj3iwTCimPEs0C/5bcSOc8KO9Wx2Yt27jT1Wl2UqK5akZ0sSawS12h3KVxJqm0i9mauBNl0NjsvoDdU4apRHlsbVYP9FDdBdylmMl+jmkCo1LH182JWlgkg59KtSgj3S6hqPRqnH/E0MY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by angie.orcam.me.uk (Postfix, from userid 500) id 3837B92009C; Wed, 21 Feb 2024 13:59:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 328B392009B; Wed, 21 Feb 2024 12:59:20 +0000 (GMT) Date: Wed, 21 Feb 2024 12:59:20 +0000 (GMT) From: "Maciej W. Rozycki" To: YunQiang Su cc: Nick Clifton , binutils@sourceware.org, xry111@xry111.site Subject: Re: [PATCH v5] MIPS: Reject branch absolute relocs for PIC for linking In-Reply-To: <20240207173102.2989195-1-syq@gcc.gnu.org> Message-ID: References: <20240207173102.2989195-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=-1163.3 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 Thu, 8 Feb 2024, YunQiang Su wrote: > The asm code like: > b (8) > will emit absolute relocs like: > R_MIPS_PC16 *ABS* > > If they are included into PIC shared objects or PIE executables, > the branch target will be like 0x12340000, which will make the > programs crash. This needs a proper LD test case. I don't think `8' needs to be parenthesised here. Maciej