From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by server2.sourceware.org (Postfix) with ESMTPS id 323493947C3B for ; Mon, 9 Mar 2020 11:56:28 +0000 (GMT) Received: by mail-pg1-x544.google.com with SMTP id s2so4606095pgv.6 for ; Mon, 09 Mar 2020 04:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Lc29uqb3aazb+D7qV/wuHZuuV7EI1PU1gAiC74opKUk=; b=lvfXM0KDmjcnbJSywBQeEVlyk4qjTuZQjryZm0vL3TaNHAmXuSzyOU0ObdWTPGfMoX ZXC9ScViS2So2mIdqm8CxJJAOAmKM87nXmRUVhNpwuZuNi5GlN1LI+NI2VNOextLdFcJ eZvTFp9JIZ119j7vGnBAYO6HpJOi1J6MIBkrMOhDsSKUtasfNjL/papdq4MDbs54a0RP +4Tcnaeo1YzRxFFRKhUOg0xMnIqU8tnYS10MnfljPV9ulSebs/8hUNdOMBT+wjSUJx4U ONwjClN5SJ+UL31B5Li0sCW690U3DyDnhOlsgCBzw2enCNN2z9SGvJYhFcvmsmUbRLc2 XIOw== 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=Lc29uqb3aazb+D7qV/wuHZuuV7EI1PU1gAiC74opKUk=; b=D2OnY8PqXolyRp6q8npxGPrFS6VszUl0VDLM1Xbrcmn2tJFw4PBuv8qnlORQIVhT7k k7SrHax8iRuOzHW081PMJBztH7CgYrf3cD/WhBzA8VL682rYC7LgKBBQOcNRGmifD1Ja GCnAg6WRX9+OVqQgh7iJsajnPnA6u97KSMIHURy4idpdoVvDMvahuA+wN03LlS/9ipjO tawZQWBmBkFVg6YUorNEMZ+dPBXlaMrBysmk83nNJBcmofciA5kWBuhk0bXYE5BvZkdS uK54VFGPPHuqnqpGR6GPTaq3YAAZhrmgJJRuDYFvVikovhjb+AqHb6FyQhhvJZ6Mq/X9 7OyQ== X-Gm-Message-State: ANhLgQ1o2hUR18gzQWs4Js/8OJTTdy2gu3IzCCbhtKNonwwGdm4IU4zn gBU3FDp0THcezMjL3x28j9Ebx7D/t64= X-Google-Smtp-Source: ADFU+vt1/v0D2xaZ+rUtW5JYz+8r3UCo7QV+40ZEdmjk6wFdMrGdN/XOhqlRFXI6e/oluvV39UL3qg== X-Received: by 2002:a65:424a:: with SMTP id d10mr1714317pgq.84.1583754987280; Mon, 09 Mar 2020 04:56:27 -0700 (PDT) Received: from bubble.grove.modra.org ([2406:3400:51d:8cc0:c886:8795:5072:fe68]) by smtp.gmail.com with ESMTPSA id x65sm33043061pfd.34.2020.03.09.04.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 04:56:26 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id A3B0F89F42; Mon, 9 Mar 2020 22:26:22 +1030 (ACDT) Date: Mon, 9 Mar 2020 22:26:22 +1030 From: Alan Modra To: "H.J. Lu" Cc: Kaylee Blake , Binutils Subject: Re: RFC: [PATCH] ELF: Don't require section header on ELF objects Message-ID: <20200309115622.GL5384@bubble.grove.modra.org> References: <20200308175947.GA911529@gmail.com> <20200308233553.GG5384@bubble.grove.modra.org> <20200309000543.GJ5384@bubble.grove.modra.org> <0ad58560-3dd4-badd-5661-9f74905a7df3@gmail.com> <20200309022309.GK5384@bubble.grove.modra.org> 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=-2.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 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: Mon, 09 Mar 2020 11:56:28 -0000 On Sun, Mar 08, 2020 at 07:35:56PM -0700, H.J. Lu wrote: > On Sun, Mar 8, 2020 at 7:23 PM Alan Modra wrote: > > It doesn't. The snippet of .dynsym I posted was from a binary with > > DT_GNU_HASH. elflink.c:_bfd_elf_link_renumber_dynsyms should convince > > you that any ordering seen is by chance. I forgot that elf_gnu_hash_process_symidx does in fact perform yet another ordering of .dynsyms, so undefined non-locals are put before defined non-locals. > Entries in DT_GNU_HASH were originally defined. A backend > may change some entries to undefined. Yeah, the function pointer hack to make pointer comparisons work between an application and shared libray. SHN_UNDEF but with a non-zero value like defined symbols, so not really undefined. -- Alan Modra Australia Development Lab, IBM