about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-04-04 11:50:30 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-04-04 12:42:31 +0200
commite549839f61eeee87a575ccc132eff8099e333c32 (patch)
treebf5a4d7fd6eeb07054bdbb01363af3a6bf938d99 /tests
parent11e6c261e8a0bd19378b5f2a3f5ac4277d748a94 (diff)
modules/gpg-agent: Use dlopen() for libsystemd
Latest <nixpkgs> (NixOS/nixpkgs@e899ffc as of my latest pull) causes our
preloader to load fork() from libpthread instead of using the overridden
one from the preload wrapper (without store paths to be easier to read):

binding file gpg-agent [0] to libpthread.so.0 [0]:
  normal symbol `fork' [GLIBC_2.2.5]

However, at the time I've committed 8db1803, I was testing it on an
older version (NixOS/nixpkgs@81af597) and it was bound correctly:

binding file gpg-agent [0] to gpg-agent-wrapper [0]:
  normal symbol `fork' [GLIBC_2.2.5]

Now after bisecting this against the latest <nixpkgs> master, it
revealed that one of the following commits could be the problem:

 * NixOS/nixpkgs@559ecc9: stdenv-linux: Avoid building m4/bison twice
 * NixOS/nixpkgs@817145e: binutils: 2.23.1 -> 2.26
 * NixOS/nixpkgs@2040a9a: stdenv-linux: Ensure binutils comes before
                          bootstrapTools in $PATH

So my guess was that the binutils update changed that behaviour somehow,
so I checked against 2.23.1 (reverted NixOS/nixpkgs@817145e) and 2.25
and it worked correctly.

I didn't bisect this against the binutils source tree, but what happens
is that because we depend on libsystemd in our wrapper, libsystemd (and
thus libpthread) is loaded first and thus we can't override things
anymore which get pulled in by RTLD while loading libsystemd.

The reason why I now went with dlopen() is that even if the behaviour is
back to that of binutils 2.25, we want to make sure that even if
something in ld.so should change which affect this as well we're still
not tripping into the same problem again.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions