Skip to content

Commit

Permalink
Make asserts accept DT_FLAGS/DT_FLAGS_1 with zero flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
frobtech committed Jul 2, 2011
1 parent 4e34ac6 commit 31fffa6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2011-07-02 Roland McGrath <[email protected]>

* 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.

Expand Down
6 changes: 3 additions & 3 deletions elf/dynamic-link.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 31fffa6

Please sign in to comment.