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 903FD3858419 for ; Tue, 2 Apr 2024 11:19:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 903FD3858419 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 903FD3858419 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=1712056793; cv=none; b=uSystFW8GVrf76wRNVQiX0pPSUMdwA5QjGDu3fEgYN0/eo835nuXBdYEb+twt46hBcx+ibVY26lUec54R2brzKXyGFZk8h8thDuv2oH+4Xl4qSdCV5aZhlJ1bF7cL/lSXnapsGiQrd+UV9ep7rSkSKodUPz9m6mICycp5PgxuQ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712056793; c=relaxed/simple; bh=M3CbA/EHrSMBLzmDN9AjUabyjvwQB3y+DAV4uJIXyzc=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=AKGyWgV9r6tC1yzsVRTWN8wkflwxW9ZU4zTKp+dLLPSA960xRBi6RSQAEEvhgpGCG7IbmN0jLhqUAy0r4Ktl0tiS2PP1hnzDLNUYXbLHVQSZRyjtQb+MD9KweI1EudIkbFD1dLLudtsRlVr2UlRtkAPN1GhtPQrxoIgv8UukmPQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by angie.orcam.me.uk (Postfix, from userid 500) id 2E67492009C; Tue, 2 Apr 2024 13:19:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 2C3E292009B; Tue, 2 Apr 2024 12:19:50 +0100 (BST) Date: Tue, 2 Apr 2024 12:19:50 +0100 (BST) From: "Maciej W. Rozycki" To: Alan Modra cc: binutils@sourceware.org, Chenghua Xu Subject: Re: MIPS HI16 and LO16 reloc howtos In-Reply-To: Message-ID: References: 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.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP 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 Tue, 2 Apr 2024, Alan Modra wrote: > PR 19977 > * elf32-mips.c: Correct rightshift for HI16, HIGHER and HIGHEST > reloc howtos. Correct complain_on_overflow for LO16 relocs. > * elf64-mips.c: Likewise. > * elfn32-mips.c: Likewise. > > OK? This is a prerequisite to fixing PR19977. It does seem to me like a correct change to make, so OK. Thank you for working on this issue. NB I pushed this through regression testing for additional safety and noticed numerous: FAIL: gas/all/none regressions. As it happened there was one: FAIL: Output file must be distinct from input failure too and gas/testsuite/gas/all/none.s got replaced with ELF output: $ file gas/testsuite/gas/all/none.s gas/testsuite/gas/all/none.s: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped This comes from gas/testsuite/gas/all/gas.exp, where we have: if { ![ishost "*-*-mingw*"] } then { gas_test_error "none.s" "-o $srcdir/$subdir/none.s" "Output file must be distinct from input" } which I think is an ill way to run a test, as it risks source corruption in the case of a failure, which is exactly what happened here. I think a copy of the source file has to be made in the testsuite object directory and operated on instead. Why the failure happened is another matter; it seems intermittent and happened exactly once for a single varying target in all my test runs starting from Jul 29th, 2023, hmm... Maciej