I'm not sure, whether the dynamic linker /usr/bin/ld
is automatically invoked by the operating system, when the ELF file is loaded, or whether it's invoked by code embedded in the ELF file?
When I use r2
to debug an ELF file, it stops at first instruction to be executed, which should be dynamic linker code, but I don't know if this code is part of the ELF file.
gdb
breakpoint? – Stephen Kitt Sep 06 '19 at 11:50gdb
breakpoint? – Stephen Kitt Sep 06 '19 at 11:57/usr/lib/ld-linux.so
. – 炸鱼薯条德里克 Sep 06 '19 at 11:57r
in gdb will only stop at the breakpoints you set before, if any (or on a signal, etc)./usr/bin/ld
has nothing to do with anything (and only exists on systems where GNU binutils or other development suite was installed) – Sep 06 '19 at 14:18r2
then. I edit. So,ld
is only used for linking throughgcc
(with static and dynamic libraries, I.e. shared libraries, .so files)? – Shuzheng Sep 06 '19 at 14:44