|author||Rich Felker <email@example.com>||2013-07-18 19:29:44 -0400|
|committer||Rich Felker <firstname.lastname@example.org>||2013-07-18 19:29:44 -0400|
make the dynamic linker find its path file relative to its own location
prior to this change, using a non-default syslibdir was impractical on systems where the ordinary library paths contain musl-incompatible library files. the file containing search paths was always taken from /etc, which would either correspond to a system-wide musl installation, or fail to exist at all, resulting in searching of the default library path. the new search strategy is safe even for suid programs because the pathname used comes from the PT_INTERP header of the program being run, rather than any external input. as part of this change, I have also begun differentiating the names of arch variants that differ by endianness or floating point calling convention. the corresponding changes in the build system and and gcc wrapper script (to use an alternate dynamic linker name) for these configurations have not yet been made.
Diffstat (limited to 'arch/arm')
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/reloc.h b/arch/arm/reloc.h
index b41314de..9ca0b48c 100644
@@ -1,7 +1,20 @@
-#define ETC_LDSO_PATH "/etc/ld-musl-arm.path"
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define ENDIAN_SUFFIX "eb"
+#define ENDIAN_SUFFIX ""
+#define FP_SUFFIX ""
+#define FP_SUFFIX "hf"
+#define LDSO_ARCH "arm" ENDIAN_SUFFIX FP_SUFFIX
#define IS_COPY(x) ((x)==R_ARM_COPY)
#define IS_PLT(x) ((x)==R_ARM_JUMP_SLOT)