Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "ld-2.11.1.so" and how can I look at the source code?

Tags:

linux

I am trying to catalog uses of the RDTSC instruction on my computer. My first thought was to run my /lib folder through objdump and search for RDTSC

$ for f in ls /lib/*; do echo "*** $f ***" && objdump -d $f | grep -n  rdtsc; done > ~/tmp/out

I noticed that a lot of RDTSC is present in the ld.2.11.1.so file. I am pretty sure it has something to do with dynamic library linking, but I'm not sure. My real question is, how can I find the source code so I can see what the RDTSC instructions are for?

like image 971
Robert Martin Avatar asked Oct 23 '11 20:10

Robert Martin


2 Answers

ld-2.11.1.so is the dynamic linker itself. Most of its sources live in glibc/elf directory. You may want to start here. Look for HP_TIMING* macros.

like image 167
Employed Russian Avatar answered Nov 03 '22 11:11

Employed Russian


ld.so is part of the C library, which is typically Glibc or EGlibc, depending on the Linux distro.

like image 28
Fred Foo Avatar answered Nov 03 '22 13:11

Fred Foo