about summary refs log tree commit diff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c68
1 files changed, 39 insertions, 29 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index ebaccfc000..574d4dad4e 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -212,6 +212,7 @@ _dl_dst_count (const char *name, int is_path)
 
   return cnt;
 }
+INTDEF (_dl_dst_count)
 
 
 char *
@@ -273,6 +274,7 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
 
   return result;
 }
+INTDEF (_dl_dst_substitute)
 
 
 /* Return copy of argument with all recognized dynamic string tokens
@@ -306,7 +308,7 @@ expand_dynamic_string_token (struct link_map *l, const char *s)
   if (result == NULL)
     return NULL;
 
-  return DL_DST_SUBSTITUTE (l, s, result, 1);
+  return INT(_dl_dst_substitute) (l, s, result, 1);
 }
 
 
@@ -332,7 +334,8 @@ add_name_to_object (struct link_map *l, const char *name)
   if (newname == NULL)
     {
       /* No more memory.  */
-      _dl_signal_error (ENOMEM, name, NULL, N_("cannot allocate name record"));
+      INT(_dl_signal_error) (ENOMEM, name, NULL,
+			     N_("cannot allocate name record"));
       return;
     }
   /* The object should have a libname set from _dl_new_object.  */
@@ -433,8 +436,8 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
 	    malloc (sizeof (*dirp) + ncapstr * sizeof (enum r_dir_status)
 		    + where_len + len + 1);
 	  if (dirp == NULL)
-	    _dl_signal_error (ENOMEM, NULL, NULL,
-			      N_("cannot create cache for search path"));
+	    INT(_dl_signal_error) (ENOMEM, NULL, NULL,
+				   N_("cannot create cache for search path"));
 
 	  dirp->dirname = ((char *) dirp + sizeof (*dirp)
 			   + ncapstr * sizeof (enum r_dir_status));
@@ -509,7 +512,7 @@ decompose_rpath (struct r_search_path_struct *sps,
 		signal_error_cache:
 		  errstring = N_("cannot create cache for search path");
 		signal_error:
-		  _dl_signal_error (ENOMEM, NULL, NULL, errstring);
+		  INT(_dl_signal_error) (ENOMEM, NULL, NULL, errstring);
 		}
 
 	      result[0] = NULL;
@@ -584,7 +587,7 @@ _dl_init_paths (const char *llp)
     {
       errstring = N_("cannot create search path array");
     signal_error:
-      _dl_signal_error (ENOMEM, NULL, NULL, errstring);
+      INT(_dl_signal_error) (ENOMEM, NULL, NULL, errstring);
     }
 
   round_size = ((2 * sizeof (struct r_search_path_elem) - 1
@@ -749,7 +752,7 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l,
       free (l);
     }
   free (realname);
-  _dl_signal_error (code, name, NULL, msg);
+  INT(_dl_signal_error) (code, name, NULL, msg);
 }
 
 
@@ -808,7 +811,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
 
   /* Print debugging message.  */
   if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
-    _dl_debug_printf ("file=%s;  generating link map\n", name);
+    INT(_dl_debug_printf) ("file=%s;  generating link map\n", name);
 
   /* This is the ELF header.  We read it in `open_verify'.  */
   header = (void *) fbp->buf;
@@ -821,8 +824,8 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
       if (_dl_zerofd == -1)
 	{
 	  __close (fd);
-	  _dl_signal_error (errno, NULL, NULL,
-			    N_("cannot open zero fill device"));
+	  INT(_dl_signal_error) (errno, NULL, NULL,
+				 N_("cannot open zero fill device"));
 	}
     }
 #endif
@@ -1107,14 +1110,19 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
   l->l_entry += l->l_addr;
 
   if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
-    _dl_debug_printf ("  dynamic: 0x%0*lx  base: 0x%0*lx   size: 0x%0*Zx\n"
-		      "    entry: 0x%0*lx  phdr: 0x%0*lx  phnum:   %*u\n\n",
-		      (int) sizeof (void *) * 2, (unsigned long int) l->l_ld,
-		      (int) sizeof (void *) * 2, (unsigned long int) l->l_addr,
-		      (int) sizeof (void *) * 2, maplength,
-		      (int) sizeof (void *) * 2, (unsigned long int) l->l_entry,
-		      (int) sizeof (void *) * 2, (unsigned long int) l->l_phdr,
-		      (int) sizeof (void *) * 2, l->l_phnum);
+    INT(_dl_debug_printf) ("\
+  dynamic: 0x%0*lx  base: 0x%0*lx   size: 0x%0*Zx\n\
+    entry: 0x%0*lx  phdr: 0x%0*lx  phnum:   %*u\n\n",
+			   (int) sizeof (void *) * 2,
+			   (unsigned long int) l->l_ld,
+			   (int) sizeof (void *) * 2,
+			   (unsigned long int) l->l_addr,
+			   (int) sizeof (void *) * 2, maplength,
+			   (int) sizeof (void *) * 2,
+			   (unsigned long int) l->l_entry,
+			   (int) sizeof (void *) * 2,
+			   (unsigned long int) l->l_phdr,
+			   (int) sizeof (void *) * 2, l->l_phnum);
 
   elf_get_dynamic_info (l);
 
@@ -1189,7 +1197,7 @@ print_search_path (struct r_search_path_elem **list,
   char buf[max_dirnamelen + max_capstrlen];
   int first = 1;
 
-  _dl_debug_printf (" search path=");
+  INT(_dl_debug_printf) (" search path=");
 
   while (*list != NULL && (*list)->what == what) /* Yes, ==.  */
     {
@@ -1460,7 +1468,7 @@ open_path (const char *name, size_t namelen, int preloaded,
 
 	  /* Print name we try if this is wanted.  */
 	  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
-	    _dl_debug_printf ("  trying file=%s\n", buf);
+	    INT(_dl_debug_printf) ("  trying file=%s\n", buf);
 
 	  fd = open_verify (buf, fbp);
 	  if (this_dir->status[cnt] == unknown)
@@ -1592,9 +1600,10 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
     }
 
   /* Display information if we are debugging.  */
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0) && loader != NULL)
-    _dl_debug_printf ("\nfile=%s;  needed by %s\n", name,
-		      loader->l_name[0] ? loader->l_name : _dl_argv[0]);
+  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0)
+      && loader != NULL)
+    INT(_dl_debug_printf) ("\nfile=%s;  needed by %s\n", name,
+			   loader->l_name[0] ? loader->l_name : _dl_argv[0]);
 
   if (strchr (name, '/') == NULL)
     {
@@ -1603,7 +1612,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
       size_t namelen = strlen (name) + 1;
 
       if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
-	_dl_debug_printf ("find library=%s; searching\n", name);
+	INT(_dl_debug_printf) ("find library=%s; searching\n", name);
 
       fd = -1;
 
@@ -1752,7 +1761,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
 
       /* Add another newline when we a tracing the library loading.  */
       if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
-        _dl_debug_printf ("\n");
+        INT(_dl_debug_printf) ("\n");
     }
   else
     {
@@ -1784,8 +1793,8 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
 	  /* Enter the new object in the list of loaded objects.  */
 	  if ((name_copy = local_strdup (name)) == NULL
 	      || (l = _dl_new_object (name_copy, name, type, loader)) == NULL)
-	    _dl_signal_error (ENOMEM, name, NULL,
-			      N_("cannot create shared object descriptor"));
+	    INT(_dl_signal_error) (ENOMEM, name, NULL, N_("\
+cannot create shared object descriptor"));
 	  /* Signal that this is a faked entry.  */
 	  l->l_faked = 1;
 	  /* Since the descriptor is initialized with zero we do not
@@ -1798,9 +1807,10 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
 	  return l;
 	}
       else
-	_dl_signal_error (errno, name, NULL,
-			  N_("cannot open shared object file"));
+	INT(_dl_signal_error) (errno, name, NULL,
+			       N_("cannot open shared object file"));
     }
 
   return _dl_map_object_from_fd (name, fd, &fb, realname, loader, type, mode);
 }
+INTDEF (_dl_map_object)