From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1028 Path: news.gmane.org!not-for-mail From: Richard Pennington Newsgroups: gmane.linux.lib.musl.general Subject: Re: _GLOBAL_OFFSET_TABLE_ in ldso/*/start.s? Date: Fri, 8 Jun 2012 17:43:31 -0500 Message-ID: <1607F838-B823-40E7-882F-B4D24852AE94@pennware.com> References: <10988613.MPE7PukreT@main.pennware.com> <20120608223138.GW163@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1339195425 8821 80.91.229.3 (8 Jun 2012 22:43:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jun 2012 22:43:45 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-1029-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 09 00:43:44 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Sd7uB-00022I-Ny for gllmg-musl@plane.gmane.org; Sat, 09 Jun 2012 00:43:43 +0200 Original-Received: (qmail 15548 invoked by uid 550); 8 Jun 2012 22:43:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15539 invoked from network); 8 Jun 2012 22:43:43 -0000 X-Authority-Analysis: v=2.0 cv=eIiRfQV1 c=1 sm=0 a=DTJciuNp+dJXzEc3FAmCKQ==:17 a=JJyc-G1KNPoA:10 a=1jnc5PB5-8gA:10 a=msTO8fkKGJEA:10 a=kj9zAlcOel0A:10 a=N4Ps669bAAAA:8 a=LlFK1ah5imBfRVb_U3EA:9 a=CjuIK1q_8ugA:10 a=vyCOG2YT8jD7nIZc:21 a=E1XTdeDYIb0r8HA9:21 a=DTJciuNp+dJXzEc3FAmCKQ==:117 X-Cloudmark-Score: 0 X-Originating-IP: 72.131.3.162 X-Mailer: iPhone Mail (9B206) In-Reply-To: <20120608223138.GW163@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:1028 Archived-At: Thanks Rich. Becoming familiar with git is definitely on my todo list.=20 -Rich Sent from my iPhone On Jun 8, 2012, at 5:31 PM, Rich Felker wrote: > On Fri, Jun 08, 2012 at 03:54:46PM -0500, Richard Pennington wrote: >> What is the purpose of the _GLOBAL_OFFSET_TABLE_ reference in these files= ? It=20 >> doesn't seem to be used by __dynlink(), although it seems to be passed a a= =20 >> third parameter. >=20 > If you check git, you'll see that this code was removed. A much older > version of __dynlink took a third argument that was the base address > of the GOT, which was used to find a pointer to _DYNAMIC in the first > GOT slot (traditionally, it was stored there). Then people started > reporting crashes when linking with a non-binutils linker (gold? or > something from clang/llvm? I don't remember...) that didn't follow > this practice, so I replaced it with more elaborate code to find > _DYNAMIC. The unneeded code in the asm was not removed until much > later. I actually have a new idea for simplifying/replacing some of > the C code, but it won't affect the asm. >=20 > By the way, it might be a good idea to familiarize yourself with git > or even the gitweb interface. Questions like the one you had just now > can usually be answered quickly by checking the history of the > relevant files. >=20 > Rich