summaryrefslogtreecommitdiff
path: root/arch/x86_64
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-25 01:56:34 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-25 01:56:34 -0400
commit568b8075a4406ca8cb1f718e74fd0829cb7f0b90 (patch)
tree0a071dabd590f6ca123cdc1c3906ef497efe8a92 /arch/x86_64
parentf937031800e3130b3b4bb42d0d547bb69a5d32db (diff)
downloadmusl-568b8075a4406ca8cb1f718e74fd0829cb7f0b90.tar.gz
musl-568b8075a4406ca8cb1f718e74fd0829cb7f0b90.tar.bz2
musl-568b8075a4406ca8cb1f718e74fd0829cb7f0b90.tar.xz
musl-568b8075a4406ca8cb1f718e74fd0829cb7f0b90.zip
proper path searching for dynamic linker
first, use $LD_LIBRARY_PATH unless suid. if that fails, read path from /etc/ld-musl-$ARCH.path and fallback to a builtin default.
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/reloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86_64/reloc.h b/arch/x86_64/reloc.h
index 2db6115d..6642fdd4 100644
--- a/arch/x86_64/reloc.h
+++ b/arch/x86_64/reloc.h
@@ -2,6 +2,8 @@
#include <string.h>
#include <elf.h>
+#define ETC_LDSO_PATH "/etc/ld-musl-x86_64.path"
+
#define IS_COPY(x) ((x)==R_X86_64_COPY)
static inline void do_single_reloc(size_t *reloc_addr, int type, size_t sym_val, size_t sym_size, unsigned char *base_addr, size_t addend)