From: Roland McGrath Date: Sat, 11 Jun 2011 10:35:31 +0000 (-0700) Subject: Make asserts accept DT_FLAGS/DT_FLAGS_1 with zero flags. X-Git-Tag: glibc-2.15~489^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31fffa6b0700f9cc0f903a53489b829290168b4c;p=thirdparty%2Fglibc.git Make asserts accept DT_FLAGS/DT_FLAGS_1 with zero flags. --- diff --git a/ChangeLog b/ChangeLog index 440545a5730..7c8c2e2854f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-07-02 Roland McGrath + * elf/dynamic-link.h (elf_get_dynamic_info): Make asserts accept + DT_FLAGS/DT_FLAGS_1 with zero flags. + * elf/Makefile ($(objpfx)ld.so): Use -defsym=_begin=0 instead of linker script munging. diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h index 6d7e14282fa..9c16da4ebeb 100644 --- a/elf/dynamic-link.h +++ b/elf/dynamic-link.h @@ -1,5 +1,5 @@ /* Inline functions for dynamic linking. - Copyright (C) 1995-2005, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 1995-2005,2006,2008,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -201,9 +201,9 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) #ifdef RTLD_BOOTSTRAP /* Only the bind now flags are allowed. */ assert (info[VERSYMIDX (DT_FLAGS_1)] == NULL - || info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val == DF_1_NOW); + || (info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val & ~DF_1_NOW) == 0); assert (info[DT_FLAGS] == NULL - || info[DT_FLAGS]->d_un.d_val == DF_BIND_NOW); + || (info[DT_FLAGS]->d_un.d_val & ~DF_BIND_NOW) == 0); /* Flags must not be set for ld.so. */ assert (info[DT_RUNPATH] == NULL); assert (info[DT_RPATH] == NULL);