Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108261066
D40925.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D40925.diff
View Options
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -804,7 +804,7 @@
aux_info[AT_STACKPROT]->a_un.a_val != 0)
stack_prot = aux_info[AT_STACKPROT]->a_un.a_val;
-#ifndef COMPAT_32BIT
+#ifndef COMPAT_libcompat
/*
* Get the actual dynamic linker pathname from the executable if
* possible. (It should always be possible.) That ensures that
diff --git a/libexec/rtld-elf/rtld_paths.h b/libexec/rtld-elf/rtld_paths.h
--- a/libexec/rtld-elf/rtld_paths.h
+++ b/libexec/rtld-elf/rtld_paths.h
@@ -31,53 +31,68 @@
#undef _PATH_ELF_HINTS
-#ifndef _COMPAT32_BASENAME_RTLD
-#define _COMPAT32_BASENAME_RTLD "ld-elf32.so.1"
+#ifndef _RTLD_COMPAT_LIB_SUFFIX
+#ifdef COMPAT_libcompat
+#define _RTLD_COMPAT_LIB_SUFFIX COMPAT_libcompat
+#else
+#define _RTLD_COMPAT_LIB_SUFFIX ""
+#endif
#endif
-#ifndef _PATH_ELF32_HINTS
-#define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints"
+#ifndef _RTLD_COMPAT_ENV_SUFFIX
+#ifdef COMPAT_LIBCOMPAT
+#define _RTLD_COMPAT_ENV_SUFFIX COMPAT_LIBCOMPAT "_"
+#else
+#define _RTLD_COMPAT_ENV_SUFFIX ""
+#endif
#endif
-#ifdef COMPAT_32BIT
-#define _PATH_ELF_HINTS _PATH_ELF32_HINTS
-#define _PATH_LIBMAP_CONF "/etc/libmap32.conf"
-#define _BASENAME_RTLD _COMPAT32_BASENAME_RTLD
-#define STANDARD_LIBRARY_PATH "/lib32:/usr/lib32"
-#define LD_ "LD_32_"
-#define TOKEN_LIB "lib32"
+#ifndef __PATH_ELF_HINTS
+#define __PATH_ELF_HINTS(_lc) "/var/run/ld-elf" _lc ".so.hints"
#endif
#ifndef _PATH_ELF_HINTS
-#define _PATH_ELF_HINTS "/var/run/ld-elf.so.hints"
+#define _PATH_ELF_HINTS __PATH_ELF_HINTS(_RTLD_COMPAT_LIB_SUFFIX)
#endif
#ifndef _PATH_LIBMAP_CONF
-#define _PATH_LIBMAP_CONF "/etc/libmap.conf"
+#define _PATH_LIBMAP_CONF "/etc/libmap" _RTLD_COMPAT_LIB_SUFFIX ".conf"
+#endif
+
+#ifndef __BASENAME_RTLD
+#define __BASENAME_RTLD(_lc) "ld-elf" _lc ".so.1"
#endif
#ifndef _BASENAME_RTLD
-#define _BASENAME_RTLD "ld-elf.so.1"
+#define _BASENAME_RTLD __BASENAME_RTLD(_RTLD_COMPAT_LIB_SUFFIX)
#endif
-#ifndef _PATH_RTLD
-#define _PATH_RTLD "/libexec/" _BASENAME_RTLD
+#ifndef __PATH_RTLD
+#define __PATH_RTLD(_lc) "/libexec/" __BASENAME_RTLD(_lc)
#endif
-#ifndef _COMPAT32_PATH_RTLD
-#define _COMPAT32_PATH_RTLD "/libexec/" _COMPAT32_BASENAME_RTLD
+#ifndef _PATH_RTLD
+#define _PATH_RTLD __PATH_RTLD(_RTLD_COMPAT_LIB_SUFFIX)
#endif
#ifndef STANDARD_LIBRARY_PATH
-#define STANDARD_LIBRARY_PATH "/lib:/usr/lib"
+#define STANDARD_LIBRARY_PATH "/lib" _RTLD_COMPAT_LIB_SUFFIX ":/usr/lib" _RTLD_COMPAT_LIB_SUFFIX
#endif
#ifndef LD_
-#define LD_ "LD_"
+#define LD_ "LD_" _RTLD_COMPAT_ENV_SUFFIX
#endif
#ifndef TOKEN_LIB
-#define TOKEN_LIB "lib"
+#define TOKEN_LIB "lib" _RTLD_COMPAT_LIB_SUFFIX
+#endif
+
+#ifndef _PATH_ELF32_HINTS
+#define _PATH_ELF32_HINTS __PATH_ELF_HINTS("32")
+#endif
+
+#ifndef _COMPAT32_PATH_RTLD
+#define _COMPAT32_PATH_RTLD __PATH_RTLD("32")
#endif
#ifdef IN_RTLD
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 5:06 AM (19 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16078074
Default Alt Text
D40925.diff (2 KB)
Attached To
Mode
D40925: rtld-elf: Migrate from COMPAT_32BIT to generic COMPAT_libcompat/LIBCOMPAT
Attached
Detach File
Event Timeline
Log In to Comment