From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x52c.google.com with SMTP id b12so19595030pgj.6 for ; Mon, 16 Jan 2023 04:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=6MDYsiSP2NvFdXM1eZIJ2xZ0LlD+21hMxid6T+Gs5GU=; b=mCmU9YWWYSiFXf/9uPuCJERYmQr1YGSoVxM6mO/2a6S6rGHCofJHxwoyg8OS3U21b8 cTI6y2gOP86dHjfnGYgn4TWFDGA2baDZ3bGFP9k9pV1/UprJqgJfEOT6X3LVhsu+BWPZ vzkjLWj3oqmjFaaUOhkelS3oTadz6hx96lzmV//aAY5r4r4/ti70V+yF0jufY5iZ7U7g wkQV6GPlRGVpDpEpIKefK9SL2EHG1FUT7PSF5eJm3dT5az1J/xx4a2LcrIBKDDHUEuFe pZcuOusFhx/4FU4AdgDW+i7SVxmsqXi5ZdQXIVnDU0i4S6MGkKC1vbapN3V9A0mG5C4K tw7w== 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-Google-Smtp-Source: AMrXdXvHmHePnycXDrD8DpaEorXIeXkMJJy6vdhBxcrdfb2pGpD5JC5AzESuTgFik0ttXWwZZSiC2g== 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 From: Alan Modra To: binutils@sourceware.org Subject: COFF CALC_ADDEND comment Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 List-Id: 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 -- Alan Modra Australia Development Lab, IBM