aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-11-21 06:33:19 -0800
committerH.J. Lu <hjl.tools@gmail.com>2012-11-21 06:33:19 -0800
commit7e1be741255c40a2d71ea7c888eff39a3aaa32e9 (patch)
treec78a665d15bb6a1f22b63063f1f64545f351536d /elf
parent86fe56bbdece927de2b0c6f122493e97ad12937a (diff)
downloadglibc-7e1be741255c40a2d71ea7c888eff39a3aaa32e9.tar
glibc-7e1be741255c40a2d71ea7c888eff39a3aaa32e9.tar.gz
glibc-7e1be741255c40a2d71ea7c888eff39a3aaa32e9.tar.bz2
glibc-7e1be741255c40a2d71ea7c888eff39a3aaa32e9.zip
Check supported DF_1_XXX bits
Diffstat (limited to 'elf')
-rw-r--r--elf/elf.h9
-rw-r--r--elf/get-dynamic-info.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/elf/elf.h b/elf/elf.h
index 1effa0710d..b07e6ad931 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -798,6 +798,15 @@ typedef struct
#define DF_1_ENDFILTEE 0x00004000 /* Filtee terminates filters search. */
#define DF_1_DISPRELDNE 0x00008000 /* Disp reloc applied at build time. */
#define DF_1_DISPRELPND 0x00010000 /* Disp reloc applied at run-time. */
+#define DF_1_NODIRECT 0x00020000 /* Object has no-direct binding. */
+#define DF_1_IGNMULDEF 0x00040000
+#define DF_1_NOKSYMS 0x00080000
+#define DF_1_NOHDR 0x00100000
+#define DF_1_EDITED 0x00200000 /* Object is modified after built. */
+#define DF_1_NORELOC 0x00400000
+#define DF_1_SYMINTPOSE 0x00800000 /* Object has individual interposers. */
+#define DF_1_GLOBAUDIT 0x01000000 /* Global auditin required. */
+#define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */
/* Flags for the feature selection in DT_FEATURE_1. */
#define DTF_1_PARINIT 0x00000001
diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h
index ffac75f635..9e018de6d2 100644
--- a/elf/get-dynamic-info.h
+++ b/elf/get-dynamic-info.h
@@ -151,6 +151,9 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
{
l->l_flags_1 = info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val;
+ /* Only DT_1_SUPPORTED_MASK bits are allowed. */
+ assert ((l->l_flags_1 & ~DT_1_SUPPORTED_MASK) == 0);
+
if (l->l_flags_1 & DF_1_NOW)
info[DT_BIND_NOW] = info[VERSYMIDX (DT_FLAGS_1)];
}