|
Message-ID: <20120608223138.GW163@brightrain.aerifal.cx> Date: Fri, 8 Jun 2012 18:31:38 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: _GLOBAL_OFFSET_TABLE_ in ldso/*/start.s? 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 > doesn't seem to be used by __dynlink(), although it seems to be passed a a > third parameter. 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. 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. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.