From 7e1be741255c40a2d71ea7c888eff39a3aaa32e9 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 21 Nov 2012 06:33:19 -0800 Subject: Check supported DF_1_XXX bits --- elf/get-dynamic-info.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'elf/get-dynamic-info.h') diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h index ffac75f..9e018de 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)]; } -- cgit v1.1