From patchwork Mon Jan 16 12:54:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 44107 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1174933wrn; Mon, 16 Jan 2023 04:54:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXvdMaxDef1zP/hDOHp7KAwtK1aGD7AK0PVqlbEvVDCPsRHerVZB50B2l80pCRaaSwr0ZAbe X-Received: by 2002:a05:6402:12cc:b0:494:cb3b:eb59 with SMTP id k12-20020a05640212cc00b00494cb3beb59mr34078676edx.12.1673873687355; Mon, 16 Jan 2023 04:54:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673873687; cv=none; d=google.com; s=arc-20160816; b=Hbms7dTLnEtt0df4nCkIp5lv2xaeQZ+aeGGrIMucI9XW/ljMCO05zGvShmPHJ8oZ/6 GBfoi2k1uZCXwVaxV5MxWgWfpLgDPhAsNboIKWYg/Tbxsxw9ODn9L1ly+bm1oJ4j+QOP iJHJTgxH68DyjR/Kxj+fBvawVdac6R6g6zr1HMZxvagGG/PGrjAVkdVB6yQrf92kECXQ c/mdccAejWxy7dePjzgCfSx4GVUkdIJ1w8tmW4eZkgh3cpdVTifhXauSAig77KHZ+mV6 q8fWTpZsUJzaCLUPulxhIOwmg/qHx1BeXUn//qk2KlA6TN5gSF0Iqvt1XnPoHhtSt+N5 afAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=6MDYsiSP2NvFdXM1eZIJ2xZ0LlD+21hMxid6T+Gs5GU=; b=b6owWeG9/2/OlhMUAtmQSn5B28iy2QA3t3fDSecPyw2xgqoXr/jqhKbOvtJSDrbRQN 4SG1+lgjkU2hQgaYG5WEDe6v1Y38wtFC9fp94bn2+Lnzda47798GdGyIQId/4JZtI3sq 4hOH/M6FG9bhrbpfnv8BQZjTA1CyodUM6QRRHzVbjSxgVJdTokyGZPczfi0EoyyLl4JL w2keTke8aDr4IAXAnSIBT0xcOVXy9e0ei35Zy7H9LAXYOyrcYNbLfCvBe30GaV3ul2q6 UppcN6OiR110bfiSXgO7dLBIvADPIex0F6PzpZHg7VjT5Fsz5KserPFyh78A5Q6KLvf6 ItcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Jp9QGBJy; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id m14-20020a056402430e00b0049e1b66b3f5si2388953edc.450.2023.01.16.04.54.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 04:54:47 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Jp9QGBJy; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5DCED3858D33 for ; Mon, 16 Jan 2023 12:54:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DCED3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673873686; bh=6MDYsiSP2NvFdXM1eZIJ2xZ0LlD+21hMxid6T+Gs5GU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Jp9QGBJytrR8dzkEtr+Dqqux90rz3/ixvtN9RIblIEFWZ5ICIHoVJitfpYo25xn2L 4Ua6Cec1qRKPVSyGVHVzuuDC4aq1Lcr8XRFzpbre3pYBcU8OisGTm17JQgp33lzboY oZ4KmoZtZxVKV1f7YcPsQ0Ze1mqcpQdeFkHYZ5d0= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id CE6083858D32 for ; Mon, 16 Jan 2023 12:54:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CE6083858D32 Received: by mail-pg1-x52c.google.com with SMTP id b12so19595030pgj.6 for ; Mon, 16 Jan 2023 04:54:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6MDYsiSP2NvFdXM1eZIJ2xZ0LlD+21hMxid6T+Gs5GU=; b=YjScIccdZ5x1kzHT19dFS+/eVfkXFPvDGxWKxxMYgDGchWm6zMDssNGZbFRdJGI3iX rMpWcrcTcGLdexvR37VgX3Opc2CXfz9pq9w1ZHDxosS/MVkJ7BNiNg71RnnEyJtDOZzp VII3ATEmwDaJY680CkZcSoXoQGJCyYRoN2p6kSX4pb/yP4AQ7yfJePHqYo1wji9DBi6g kDH/lycHn5+8TQfBDvhCvAArWQe4w0uXv4+TqlMtLG1ZOLfTKky1mS65C7oPpzSBfW4k lqqM10YrudwrJYxWsKWJ1dbgWe1o4ZeH2wrmCIVIiQzkmO3cCG4GWSwvQHVDj2Gjr/PT OLGA== X-Gm-Message-State: AFqh2kpV2/kbb4wTmu1Iqt4hhfUi+N/+av1lp13zT8RSNYEacBCGJOmN d6/LyHvx2Vtf+unlwddOiDbErvabaSs= X-Received: by 2002:aa7:84c4:0:b0:58b:c7f8:623c with SMTP id x4-20020aa784c4000000b0058bc7f8623cmr8200306pfn.27.1673873676716; Mon, 16 Jan 2023 04:54:36 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id u64-20020a627943000000b00581816425f3sm17951900pfc.112.2023.01.16.04.54.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 04:54:36 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 00E4811420E3; Mon, 16 Jan 2023 23:24:33 +1030 (ACDT) Date: Mon, 16 Jan 2023 23:24:33 +1030 To: binutils@sourceware.org Subject: COFF CALC_ADDEND comment Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3035.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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 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-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755183775466417578?= X-GMAIL-MSGID: =?utf-8?q?1755183775466417578?= Old COFF (and AOUT) targets have unusual relocation addends. * coffcode.h (): Describe COFF addends. diff --git a/bfd/coffcode.h b/bfd/coffcode.h index e952bd77d6a..168bb8a55c2 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -5092,6 +5092,14 @@ SUBSUBSECTION structure, in a back end specific way. For instance, the 386 uses the @code{r_type} to directly produce an index into a howto table vector. + + o Note that @code{arelent.addend} for COFF is often not what + most people understand as a relocation addend, but rather an + adjustment to the relocation addend stored in section contents + of relocatable object files. The value found in section + contents may also be confusing, depending on both symbol value + and addend somewhat similar to the field value for a + final-linked object. See @code{CALC_ADDEND}. */ #ifndef CALC_ADDEND