aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorPetr Malat <oss@malat.biz>2025-01-28 11:08:20 +0100
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-01-30 10:16:37 -0300
commit4c43173eba874039c96eca893041745c6d7be38a (patch)
tree92c4c4d375832168075395633b0a9f9ce6a95b5e /sysdeps/generic
parenta6fbe36b7f31292981422692236465ab56670ea9 (diff)
downloadglibc-4c43173eba874039c96eca893041745c6d7be38a.zip
glibc-4c43173eba874039c96eca893041745c6d7be38a.tar.gz
glibc-4c43173eba874039c96eca893041745c6d7be38a.tar.bz2
ld.so: Decorate BSS mappings
Decorate BSS mappings with [anon: glibc: .bss <file>], for example [anon: glibc: .bss /lib/libc.so.6]. The string ".bss" is already used by bionic so use the same, but add the filename as well. If the name would be longer than what the kernel allows, drop the directory part of the path. Refactor glibc.mem.decorate_maps check to a separate function and use it to avoid assembling a name, which would not be used later. Signed-off-by: Petr Malat <oss@malat.biz> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/setvmaname.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/generic/setvmaname.h b/sysdeps/generic/setvmaname.h
index baca984..496fcca 100644
--- a/sysdeps/generic/setvmaname.h
+++ b/sysdeps/generic/setvmaname.h
@@ -19,6 +19,18 @@
#ifndef __SETVMANAME_H
#define __SETVMANAME_H
+#include <stdbool.h>
+
+/* Set this to small value to not waste memory on systems, which do
+ * not support VMA name. */
+#define ANON_VMA_NAME_MAX_LEN 16
+
+static inline bool
+__is_decorate_maps_enabled (void)
+{
+ return false;
+}
+
static inline
void __set_vma_name (void *start, size_t len, const char *name)
{