[RFC][PATCH v5 07/16] Define a new dynamic section tag - DT_GNU_UNIQUE

Vivek Das Mohapatra vivek@collabora.com
Wed Jun 17 14:00:15 GMT 2020


We expect this section to be present in ELF DSOs that should
only ever have one instance across all link map namespaces.

libc and its constituent DSOs should have this section.
---
 elf/elf.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/elf/elf.h b/elf/elf.h
index 2549a177d6..80d689ca02 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -895,6 +895,7 @@ typedef struct
    Dyn.d_un.d_val field of the Elf*_Dyn structure.  This follows Sun's
    approach.  */
 #define DT_VALRNGLO	0x6ffffd00
+#define DT_GNU_UNIQUE   0x6ffffdf4      /* Open DSO once across all namespaces */
 #define DT_GNU_PRELINKED 0x6ffffdf5	/* Prelinking timestamp */
 #define DT_GNU_CONFLICTSZ 0x6ffffdf6	/* Size of conflict section */
 #define DT_GNU_LIBLISTSZ 0x6ffffdf7	/* Size of library list */
@@ -909,7 +910,7 @@ typedef struct
 #define DT_SYMINENT	0x6ffffdff	/* Entry size of syminfo */
 #define DT_VALRNGHI	0x6ffffdff
 #define DT_VALTAGIDX(tag)	(DT_VALRNGHI - (tag))	/* Reverse order! */
-#define DT_VALNUM 12
+#define DT_VALNUM 13
 
 /* DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the
    Dyn.d_un.d_ptr field of the Elf*_Dyn structure.
-- 
2.11.0



More information about the Libc-alpha mailing list