Robert Martin
Robert Martin

Reputation: 17157

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

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?

Upvotes: 8

Views: 9708

Answers (2)

Fred Foo
Fred Foo

Reputation: 363597

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

Upvotes: 2

Employed Russian
Employed Russian

Reputation: 213596

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.

Upvotes: 13

Related Questions