Use NPTL while keeping glibc with linuxthreads

860 views Asked by At

I would like to know if it is possible to test a specific binary with nptl instead of linuxthreads which is embedded in my glibc. I don't want to recompile the glibc because it is the one provided with my specific hardware/software and I don't want to break everything. I just want to be able to test this implementation and to see what could be the gain

Thanks in advance

1

There are 1 answers

0
Employed Russian On

I don't want to recompile the glibc

If your glibc was compiled with linuxthreads, and not nptl, then obviously you can't use it to test a binary with nptl.

Your choices are:

  1. Use some other (newer) system that has nptl-enabled glibc, or
  2. Build a separate nptl-enabled version of glibc, and use it, e.g.

    cd glibc-2.15 ./configure --prefix=/usr/glibc-nptl && make && sudo make install

    # now run the binary using newly-built glibc:
    /usr/glibc-nptl/lib/ld-2.15.so /path/to/binary

See also this answer.