Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The addresses are basically random numbers. Before secure implementations were devised, <code>ldd</code> would consistently indicate the memory addresses where the program sections were loaded. Since about five years ago, many flavors of Linux now intentionally randomize load addresses to frustrate would-be virus writers, etc. I compiled <code>one.c</code> (as t.c) and repeatedly executed ldd:</p> <pre><code>[wally@zenetfedora .bin]$ cat t.c #include &lt;stdio.h&gt; int main() { printf ("%d", 45); } [wally@zenetfedora .bin]$ gcc -o t t.c -O3 [wally@zenetfedora .bin]$ ldd t linux-gate.so.1 =&gt; (0x009e5000) libc.so.6 =&gt; /lib/libc.so.6 (0x002e4000) /lib/ld-linux.so.2 (0x002c2000) [wally@zenetfedora .bin]$ ldd t linux-gate.so.1 =&gt; (0x00b8d000) libc.so.6 =&gt; /lib/libc.so.6 (0x002e4000) /lib/ld-linux.so.2 (0x002c2000) [wally@zenetfedora .bin]$ ldd t linux-gate.so.1 =&gt; (0x00238000) libc.so.6 =&gt; /lib/libc.so.6 (0x002e4000) /lib/ld-linux.so.2 (0x002c2000) [wally@zenetfedora .bin]$ ldd t linux-gate.so.1 =&gt; (0x002a0000) libc.so.6 =&gt; /lib/libc.so.6 (0x002e4000) /lib/ld-linux.so.2 (0x002c2000) [wally@zenetfedora .bin]$ ldd t linux-gate.so.1 =&gt; (0x00f93000) libc.so.6 =&gt; /lib/libc.so.6 (0x002e4000) /lib/ld-linux.so.2 (0x002c2000) [wally@zenetfedora .bin]$ ldd t linux-gate.so.1 =&gt; (0x00c7a000) libc.so.6 =&gt; /lib/libc.so.6 (0x002e4000) /lib/ld-linux.so.2 (0x002c2000) [wally@zenetfedora .bin]$ ldd t linux-gate.so.1 =&gt; (0x00d1a000) libc.so.6 =&gt; /lib/libc.so.6 (0x002e4000) /lib/ld-linux.so.2 (0x002c2000) [wally@zenetfedora .bin]$ ldd t linux-gate.so.1 =&gt; (0x00d12000) libc.so.6 =&gt; /lib/libc.so.6 (0x002e4000) /lib/ld-linux.so.2 (0x002c2000) </code></pre> <p>The crtl and ld-linux load addresses are consistent, but linux-gate is randomized.</p> <p>Libraries are needed because the C run time initialization and termination needs to run. Granted, those could largely be optimized away since <code>stdin</code>, <code>stdout</code>, <code>stderr</code>, etc., etc. don't need to be initialized. Still, the crtl is how <code>main()</code> gets called.</p> <p>Different flavors and versions of Linux have differences. The evolution of glib has had many twists and turns. Some stuff has been moved to other libraries. It's pretty much the same thing as why your local grocery store moves things around. It doesn't have much meaning.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload