about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-21 17:26:32 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-21 17:26:32 -0300
commit927246e1882e4aa0ac3abac1fc795be494c38141 (patch)
tree407a91203eb7b401fd3811d77bc92280b7077257
parent15a0c5730d1d5aeb95f50c9ec7470640084feae8 (diff)
downloadglibc-927246e1882e4aa0ac3abac1fc795be494c38141.tar.gz
glibc-927246e1882e4aa0ac3abac1fc795be494c38141.tar.xz
glibc-927246e1882e4aa0ac3abac1fc795be494c38141.zip
elf: Fix e6fd79f379 build with --enable-tunables=no
The _dl_sort_maps_init() is not defined when tunables is not enabled.

Checked on x86_64-linux-gnu.
-rw-r--r--sysdeps/generic/ldsodefs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 65a6a51633..1318c36dce 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -1245,7 +1245,16 @@ extern struct link_map * _dl_get_dl_main_map (void)
 #endif
 
 /* Initialize the DSO sort algorithm to use.  */
+#if !HAVE_TUNABLES
+static inline void
+__always_inline
+_dl_sort_maps_init (void)
+{
+  /* This is optimized out if tunables are not enabled.  */
+}
+#else
 extern void _dl_sort_maps_init (void) attribute_hidden;
+#endif
 
 /* Initialization of libpthread for statically linked applications.
    If libpthread is not linked in, this is an empty function.  */