From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46284 invoked by alias); 22 Apr 2016 21:49:40 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 46274 invoked by uid 89); 22 Apr 2016 21:49:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Apr 2016 21:49:34 +0000 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Websense Email with ESMTPS id 04F51CB5E71DD; Fri, 22 Apr 2016 22:49:28 +0100 (IST) Received: from BADAG03.ba.imgtec.org (10.20.40.115) by HHMAIL01.hh.imgtec.org (10.100.10.19) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 22 Apr 2016 22:49:32 +0100 Received: from BADAG02.ba.imgtec.org ([fe80::612d:e977:c603:32d6]) by badag03.ba.imgtec.org ([::1]) with mapi id 14.03.0266.001; Fri, 22 Apr 2016 14:49:29 -0700 From: Faraz Shahbazker To: "H.J. Lu" CC: Binutils Subject: RE: [committed, PATCH] Always create dynsym section with dynamic sections Date: Fri, 22 Apr 2016 21:49:00 -0000 Message-ID: References: <20160223003208.GA30022@intel.com> <571A59A8.4000700@imgtec.com> <571A73BE.4000709@imgtec.com>, In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2016-04/txt/msg00382.txt.bz2 On 04/22/2016 12:28 PM, H.J. Lu wrote: > On Fri, Apr 22, 2016 at 11:55 AM, Faraz Shahbazker >> + if (dynsymcount !=3D 0 || elf_hash_table (info)->dynamic_sections_crea= ted) >> + ++dynsymcount; >=20 > Are you saying dynamic_sections_created is 0 for MIPS here > and will become 1 later? No, it will remain 0. The link is static, but the hash_table is still used = to record global symbols that have GOT relocations against them. Ofc, this hash_table does not result in creation of a dynsym section, because well, dynamic_sections_created is 0. Check the list of callers to bfd_elf_link_record_dynamic_symbol(), a number= of=20 architectures use the link_hash_table in situations where it is not clear w= hether it is being used to track dynamic symbols for a dynamic executable, as it is for = x86. Regards, Faraz Shahbazker