From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 2D158396E84B for ; Thu, 25 Feb 2021 02:09:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2D158396E84B Received: by mail-pj1-x102d.google.com with SMTP id o22so4234208pjs.1 for ; Wed, 24 Feb 2021 18:09:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PWfrBV0AmfKtWobm7yXVEEMJlSokDRmkqBQJPqSZhxQ=; b=HoTsuSWYVNPRzTPpe6ZrTrcB013JwFyxsHm7AhnJFb/Qn4RV2rmZheD7kGHd7unirA /eUrliUsYBG8ImpbaIy0Jw23CZfB/enOnO7HxoN1Ll8j5+uoSs72TtvWSlfm4VjBNQfa r8qJQXmBOqR//TWyWmldFfncgFPbn7fTWnxJ5VI5l/zantvn5DNhpHnvY0VHvbom2gkG XusK3zEhy29j36DeSZRdqHCjSfTuEXY3FwYZGyryhjEpv4pM2DS7CamMyvZ1jKNKZdvm YxIiR8jyReSnEQFsotHKwpCuGpBgIUSqjEKv4Thtm38SphZN03JOuspNB/H4zaWQOcL5 3QSQ== X-Gm-Message-State: AOAM533CJiM7AZDJnWy2kXC6vJfbHPcRtEXc2MsI88IvQr2K8pOclXKh kvuD2lxUjqIkVSGICm2DAwM= X-Google-Smtp-Source: ABdhPJz9BFizAEoVQ1xCfqrk1VBWflO7lgfl8jW8HJpVmJJFozV/lAIRMmtLMquFeryyy/OPr6RIiw== X-Received: by 2002:a17:902:9341:b029:e1:7b4e:57a8 with SMTP id g1-20020a1709029341b02900e17b4e57a8mr968772plp.34.1614218971292; Wed, 24 Feb 2021 18:09:31 -0800 (PST) Received: from bubble.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id p7sm3868040pgg.2.2021.02.24.18.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 18:09:30 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 31E4441AAC; Thu, 25 Feb 2021 12:39:27 +1030 (ACDT) Date: Thu, 25 Feb 2021 12:39:27 +1030 From: Alan Modra To: "H.J. Lu" Cc: Jan Beulich , Binutils Subject: Re: [PATCH v2] elf/x86-64: Subtract __ImageBase for R_AMD64_IMAGEBASE Message-ID: <20210225020926.GR6042@bubble.grove.modra.org> References: <20210223121558.3529429-1-hjl.tools@gmail.com> <77fa2de7-91ad-5f33-ea60-91c097d1c8ff@suse.com> <7e855896-7a78-2b57-2b98-b5ced44915b1@suse.com> <415ac1c9-549f-3fcb-08c0-582191b3a514@suse.com> <0908fa81-e546-c066-8f9f-e5d8b71e3691@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-3035.0 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 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Thu, 25 Feb 2021 02:09:33 -0000 On Tue, Feb 23, 2021 at 09:50:20AM -0800, H.J. Lu via Binutils wrote: > * reloc.c (bfd_perform_relocation): Add a link_info argument. > Subtract __ImageBase for R_AMD64_IMAGEBASE. H.J., did you consider moving all of this, including the code you added in git commit 36068e2fa54, to the relevant howto special functions? None of it really belongs in bfd_perform_relocation. You might even be able to do without a link_info parameter, instead passing the image base value in output_elf_obj_tdata. -- Alan Modra Australia Development Lab, IBM