From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by sourceware.org (Postfix) with ESMTPS id 3525C3840C17 for ; Tue, 2 Jun 2020 01:17:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3525C3840C17 Received: by mail-io1-xd44.google.com with SMTP id r2so9118669ioo.4 for ; Mon, 01 Jun 2020 18:17:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p1ZV44CnrUGZfmwXEh6MQbyFNz4SuPFsYbXulC0b6hM=; b=G6QP/JWFa35wRkJ3+2cYYvKz4Mal4CxzcgIdv2tPx+lQ06BhiJ1ZSBiy1XIgdn+nx7 j2CZuDW0rEFB2BLGLyxtaehz/VmvKFn70SAP2Es07GvOPrbF8+mZQ7vt97za++XOM55I gdPtiZ+IVwyf8OXxo8UKEABgPyAfQX2wWWhL+7iHdosX2DY7oOPVnPKaQVnRhfR3bGf3 xAW/Ib4h9cuATgL9ewJ/WHZbv059oeGg5Bzz0f50Dc8sV6JRp+FuGVI0pXTv96ZvSHNY I57dZuhXSekdgb0miZD5pFRI2vQiZjpQ/SMsOsRhTxVvDnZ5bgHecpbz+XfiggdxMZ0G wj4A== X-Gm-Message-State: AOAM532kMmLQvKPW/7aIvUoWMsglnGvP9+yny4qwyPKzp7xbGgqn6v/u 4cV+RvosRolYVSPyDRk4NVSasFjVQkC6SKRkUlE= X-Google-Smtp-Source: ABdhPJzRM2CQxnMOZNBfl6urMVRt/pFn5lJ6g/Qz4mW+LghZhZIYZSTTNOr+lY0fp628j4zVqTL03+TxwPoHkU0SdZ0= X-Received: by 2002:a02:b782:: with SMTP id f2mr23364734jam.91.1591060640626; Mon, 01 Jun 2020 18:17:20 -0700 (PDT) MIME-Version: 1.0 References: <20200601192055.646073-1-hjl.tools@gmail.com> <20200602005535.GC5204@bubble.grove.modra.org> In-Reply-To: <20200602005535.GC5204@bubble.grove.modra.org> From: "H.J. Lu" Date: Mon, 1 Jun 2020 18:16:44 -0700 Message-ID: Subject: Re: [PATCH] ELF: Move dyn_relocs to struct elf_link_hash_entry To: Alan Modra Cc: Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.1 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: Tue, 02 Jun 2020 01:17:22 -0000 On Mon, Jun 1, 2020 at 5:55 PM Alan Modra wrote: > > On Mon, Jun 01, 2020 at 12:20:55PM -0700, H.J. Lu via Binutils wrote: > > All ELF backends with shared library support have > > > > /* Track dynamic relocs copied for this symbol. */ > > struct elf_dyn_relocs *dyn_relocs; > > > > in symbol hash entry. Move dyn_relocs to struct elf_link_hash_entry > > to reduce code duplication. > > > > I will check it in if there are no objections. > > I like it. If targets need to extend struct dyn_relocs they can do > that easily enough in their target code. (The new dyn_relocs pointer > in elf_link_hash_entry could be a void*.) > I will check it in and keep dyn_relocs as struct elf_dyn_relocs *. I will have followup patches to further remove duplicated code. -- H.J.