From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 6B7713858032 for ; Mon, 21 Nov 2022 10:59:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B7713858032 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-ej1-x629.google.com with SMTP id bj12so27518306ejb.13 for ; Mon, 21 Nov 2022 02:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wzSax0J18pb4ViiZl5NGFadRTPEpEgdszkaitJ1CBSk=; b=B3AWilvHiFw1No5CmT/sLwxqG9OBo9G7tLdYi5BeCFl6Vy/+1b0w9UZCvjgUtzFcrH UdbcFuG7P8lWWYIYbDSO7jCIP7jQ83gZ13vFbStWt9o8Redyol0jjsU4w3h+qUwKKdBv Uz/5OBt8oDbnxIMBmTW/6cI3L0qvQiwud/OLN8RH+xF5JQ2XAdY/kRSN0Ht69WHGYLDx WekAYK0fJseZ2Vs95JUXuYAg7dPRJW67cHhH8H5jrynPvPB3f8qcgoQDsJQLnd0pKWwh /xPjQPYtNtxtnf0vY6vJEBk8xbx1qRf3T0MxUuvXjDpt8O9Hdjx5gRffCJpSZEPyVVTR OH2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wzSax0J18pb4ViiZl5NGFadRTPEpEgdszkaitJ1CBSk=; b=T40cUOVFKEzgTPruv3TzQ58cOP+lXUlOWV8gXq7ydBiDvzkCsXKiKZ2oUKSPPqniSV gS2OiZ2D12TzOFs4Na1+FMqpPYPFtxnv3tmEVWxBn5YvT9xYosho5XNlrxDAnq4acal2 FEueMQU66immsDN+nh/FIWZQPygesOraf0VzF1R4CL0Sc2JmsJ3Z1w96+aBj68ikbrph ynGwhHRsgVp40bWEcMOfAF8GNzBqbAirDTdb8TPWIM96e3kkA5Yd2fjE6ArJtnyV9qiz QLYjPMYMEcWW6u2qmr/Lr04TfzvQoNGes60pWFaZEnZcdEXBJsP/1rjE7krlIYt56sah RAGg== X-Gm-Message-State: ANoB5pkROpJYb1N0Xc7dAibBTqXOvCz4faoMSLoN5r4Z/QTn8CyUXTMt QGLV0PnG7XhRN5lnxgoOkhqUwwWplmJZAKAX8ToV1Brv X-Google-Smtp-Source: AA0mqf4/0TeRWW6DYxsB+DoqvWbZE1ytRcoyP8FwK+MZaad7qm4OdNk2amc5ZR7aXks0IZq5Xm8Yl86LtadhMuPCoOc= X-Received: by 2002:a17:906:944c:b0:7b2:71fa:c367 with SMTP id z12-20020a170906944c00b007b271fac367mr14110719ejx.377.1669028359786; Mon, 21 Nov 2022 02:59:19 -0800 (PST) MIME-Version: 1.0 References: <6bda2cb0-14ef-ae75-3253-689f3060c537@suse.com> <6799b669-f38b-1a4f-fd63-2c0c3da4e55d@suse.com> In-Reply-To: From: =?UTF-8?B?5b6Q5oyB5oGSIFh1IENoaWhlbmc=?= Date: Mon, 21 Nov 2022 18:59:08 +0800 Message-ID: Subject: Re: [PATCH] binutils: partially revert 17c6c3b99156fe82c1e637e1a5fd9f163ac788c8 To: Jan Beulich Cc: "binutils@sourceware.org" , "H.J. Lu" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Mon, Nov 21, 2022 at 5:52 PM Jan Beulich wrote: > > > > It is clear now that x86-64 linker treats the REL relocation entries > > as RELA relocation entries, when doing relocation, it does not count > > the addend in section content, because src_mask is set to 0. > > > > Then can objcopy transform the REL relocation entries to RELA > > relocation entries, so the x86-64 linker can consume them correctly ? > > It probably could, but I have no idea how to invasive this would end > up being. > A much simpler solution is to let the linker accept the slightly non-ABI-conformant ELF64(with both REL and RELA relocation entries). The use of src_mask is dependent on whether relocation entry is REL or RELA.