[RFC][PATCH v4 07/15] Define a new DT_FLAGS_1 flag - DF_1_UNIQUE
Vivek Das Mohapatra
vivek@collabora.com
Mon Mar 30 17:43:41 GMT 2020
We expect this flag to be set on ELF DSOs that should only
ever have one instance across all link map namespaces.
libc and its constituent DSOs should have this flag set.
---
elf/elf.h | 1 +
include/elf.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/elf/elf.h b/elf/elf.h
index 2549a177d6..e0876b5701 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -997,6 +997,7 @@ typedef struct
#define DF_1_KMOD 0x10000000
#define DF_1_WEAKFILTER 0x20000000
#define DF_1_NOCOMMON 0x40000000
+#define DF_1_UNIQUE 0x80000000 /* Object should exist at most once */
/* Flags for the feature selection in DT_FEATURE_1. */
#define DTF_1_PARINIT 0x00000001
diff --git a/include/elf.h b/include/elf.h
index 14ed67ff67..ebcae81522 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -23,7 +23,7 @@
# endif
# define DT_1_SUPPORTED_MASK \
(DF_1_NOW | DF_1_NODELETE | DF_1_INITFIRST | DF_1_NOOPEN \
- | DF_1_ORIGIN | DF_1_NODEFLIB | DF_1_PIE)
+ | DF_1_ORIGIN | DF_1_NODEFLIB | DF_1_PIE | DF_1_UNIQUE)
#endif /* !_ISOMAC */
#endif /* elf.h */
--
2.11.0
More information about the Libc-alpha
mailing list