From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 3BB743858D35 for ; Sun, 27 Feb 2022 14:01:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3BB743858D35 Received: by mail-pg1-x536.google.com with SMTP id z4so9191023pgh.12 for ; Sun, 27 Feb 2022 06:01:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GrhPlokQD20NmMdbby/Tn1DZu9LCdbaiZDjQIYakV6Y=; b=WMyb3EmKgdHTV0qn6rDPETzIBuQSskVq3gwSooJFVND/k6ZpJ7t1GC3EDdpwe0eOt5 63D7K05v52kpqFuOo0y+dWwDoXUTMPbK+8z57eAByYkLa9/BXVA1qPKMp7Pu6yIwa0MF VAP26WAVpyTP4OP9Vm4bFEVCI3/YXuOSmZfJGAIbRbAQM21i7ZCE/j5J66Mq2eCF5DY0 sGhhqpTdJk22bzQCFz+AzCx4gIxhmKp25t9zfZoNTkPi9NGsa1nfVsdkaCn+M+Nl9O4F 62KW06+X1B6GQZ6FrNNQz/qyNP1xhMSwwPm5K+Kp2qOiw0LLhvBk/O2agKZg+yk5z91H tO0w== X-Gm-Message-State: AOAM5331u5EW7AgJWEbapxH7Q/UJTDcFf66/XC96tTKUtz/fq61gWgpg +u3dJGf48yI5I/BTk0CRqV4= X-Google-Smtp-Source: ABdhPJwFSNP9sHayiH6jhtcBNB7E2POwUUm5OEVe9lxWuDXjxHlDX77HVBGiXosgNuvExKLJzVQvnQ== X-Received: by 2002:a63:318f:0:b0:378:96fe:fdfb with SMTP id x137-20020a63318f000000b0037896fefdfbmr1172564pgx.120.1645970507293; Sun, 27 Feb 2022 06:01:47 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:ebc:f9fd:89d6:1c2b]) by smtp.gmail.com with ESMTPSA id q194-20020a6275cb000000b004f396541cecsm9360324pfc.155.2022.02.27.06.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 06:01:46 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 447D11140D6C; Mon, 28 Feb 2022 00:31:43 +1030 (ACDT) Date: Mon, 28 Feb 2022 00:31:43 +1030 From: Alan Modra To: Jan Beulich Cc: Binutils , "H.J. Lu" , Nick Clifton Subject: Re: [PATCH 2/2] ELF32: don't silently truncate relocation addends Message-ID: References: <3502746c-2308-33bf-919b-4248548024c3@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3502746c-2308-33bf-919b-4248548024c3@suse.com> X-Spam-Status: No, score=-3029.6 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Feb 2022 14:01:50 -0000 On Fri, Feb 25, 2022 at 12:20:50PM +0100, Jan Beulich wrote: > At least x86-64's x32 sub-mode and RISC-V's 32-bit mode calculate > addends as 64-bit values, but store them in signed 32-bit fields when > generating the file without encountering any earlier error. When the > relocated field is a 64-bit one, the value resulting after processing > the relocation record when linking (or the latest when loading) may > thus be wrong due to the truncation. The patch causes regressions on cris, h8300, mips, and nios2. -- Alan Modra Australia Development Lab, IBM