|
|
|
|
|
by benj111
2718 days ago
|
|
I appear to be getting downvoted. Assuming its because you think I'm wrong about the separate program. Look up the manpage for ld.so . If you run the strings program on a dynamically linked program the first thing it spits out should be the path to ld.so If you run that program without arguments, it even gives you a usage message. |
|
It does this because ELF is a newer, more abstract executable format. By contrast Windows and AIX have evolved an older dynamic linking strategy which depends more heavily on the linker patching address constants embedded in the code, presumably because of the better backward compatibility. I'm too young to have had first-hand experience with the details, but I do vaguely remember the Linux transition from a.out to ELF and it seemed rather disruptive (though it was all magic to me).
But the Windows approach isn't rightly self-modifying code, either. It's more like a delayed compilation stage. Self-modifying code implies code that rewrites itself dynamically during runtime. Runtime normally means in the normal course of regular program execution, as opposed to link time. From the perspective of the code, link time is a one- or two-time event--static linking and, optionally, dynamic linking--that initializes the application code prior to its first run.