Unfamiliar linker switch "-dynamic-linker"

Viewed 129

I have some (admittedly old) makefile that generates a command line of the form -

clang++  <...>  -Wl,-dynamic-linker  [..path..]/ld-2.19.so <...>

As far as I can see the -dynamic-linker switch is undocumented. It does not control the used linker (there's -fuse-ld for that), and I don't know what the pointed .so file does.

Anyone seen something similar?

1 Answers

(dumping the answer here in case it is of use to others)

I couldn't find it in any docs, but it is mentioned in several SO answers (here's one) and in the output of ld --help.

This switch controls the linux loader (a.k.a., dynamic linker) used to load needed shared-libs into the program. The pointed .so is an alternative to the shipped loader, ld.so.

Related