about summary refs log tree commit diff
path: root/elf/do-lookup.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-23 22:58:50 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-23 22:58:50 +0000
commit06535ae9487708dad9048552c9c92828d998a897 (patch)
tree644ca3f36a0aca375c41e6bdded2d3904b8821e9 /elf/do-lookup.h
parentfc9cfb28c05def1bfc0edc099d8001f83654fd10 (diff)
downloadglibc-06535ae9487708dad9048552c9c92828d998a897.tar.gz
glibc-06535ae9487708dad9048552c9c92828d998a897.tar.xz
glibc-06535ae9487708dad9048552c9c92828d998a897.zip
Update.
	* posix/unistd.h: Move declaration of __libc_enable_secure to...
	* include/unistd.h: ...here.

	* elf/dl-open.c (dl_open_worker): If DST is used in SUID program punt.
	* elf/dl-deps.c (expand_dst): Likewise.

	* elf/dynamic-link.h: Set DT_SYMBOLIC, DT_TEXTREL, and DT_BIND_NOW
	based on DT_FLAGS value.

	* elf/do-lookup.h: Remove reference_name parameter, add undef_map.
	Add test for symbols marked STV_HIDDEN.
	* elf/dl-lookup.c (_dl_lookup_symbol): Remove reference_name parameter,
	add undef_map.  Compute reference_name locally.  Update call to
	do_lookup.
	(_dl_lookup_symbol_skip): Likewise.
	(_dl_lookup_versioned_symbol): Likewise.
	(_dl_lookup_versioned_symbol_skip): Likewise.
	* elf/dl-libc.c: Update call to _dl_lookup_*symbol.
	* elf/dl-runtime.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-symbol.c: Likewise.
	* elf/ldsodefs.h: Adjust prototypes.

	* elf/dl-reloc.c (RESOLV): Add test for STV_PROTECTED flag set and
	handle appropriately.  Add comment about DT_TEXTREL.
	* elf/dl-runtime.c: Likewise.
Diffstat (limited to 'elf/do-lookup.h')
-rw-r--r--elf/do-lookup.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/elf/do-lookup.h b/elf/do-lookup.h
index 147560bd32..f83b13ccf3 100644
--- a/elf/do-lookup.h
+++ b/elf/do-lookup.h
@@ -29,10 +29,10 @@
    found the symbol, the value 0 if nothing is found and < 0 if
    something bad happened.  */
 static inline int
-FCT (const char *undef_name, unsigned long int hash,
-     const ElfW(Sym) *ref, struct sym_val *result,
-     struct r_scope_elem *scope, size_t i, const char *reference_name,
-     ARG struct link_map *skip, int reloc_type)
+FCT (const char *undef_name, struct link_map *undef_map,
+     unsigned long int hash, const ElfW(Sym) *ref, struct sym_val *result,
+     struct r_scope_elem *scope, size_t i, ARG struct link_map *skip,
+     int reloc_type)
 {
   struct link_map **list = scope->r_list;
   size_t n = scope->r_nlist;
@@ -154,7 +154,12 @@ FCT (const char *undef_name, unsigned long int hash,
 	sym = num_versions == 1 ? versioned_sym : NULL;
 #endif
 
-      if (sym != NULL)
+      if (sym != NULL
+	  /* Don't allow binding if the symbol is hidden.  When processor
+	     specific definitions for STV_INTERNAL are defined we might
+	     have to extend this conditional.  */
+	  && (ELFW(ST_VISIBILITY) (sym->st_other) != STV_HIDDEN
+	      || map == undef_map))
 	{
 	found_it:
 	  switch (ELFW(ST_BIND) (sym->st_info))