diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-31 00:20:50 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:35 +0200 |
commit | 6ac83250f28be17add6324129cf5890ca9920701 (patch) | |
tree | 85f1198326934961fd1875a1638f784fd1d0a700 /ldso/include/ldso.h | |
parent | 41494ee200f2d4f038b0fe7c79e83a7f45f8b4cd (diff) |
ldso: use _dl_strdup and _dl_dprintf only in ld-uClibc.so
Add support for %p to _dl_dprintf for later corrections in debug messages.
Disable _dl_debug_file if LD debugging is not enabled and change it's use to 2.
The use of dprintf in elfinterp.c will spit out warnings, will be fixed in the
reworked ldso.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'ldso/include/ldso.h')
-rw-r--r-- | ldso/include/ldso.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h index fc356b0e3..f5bb6e077 100644 --- a/ldso/include/ldso.h +++ b/ldso/include/ldso.h @@ -113,7 +113,8 @@ extern int _dl_debug_file; #else # define __dl_debug_dprint(fmt, args...) do {} while (0) # define _dl_if_debug_dprint(fmt, args...) do {} while (0) -# define _dl_debug_file 2 +/* disabled on purpose, _dl_debug_file should be guarded by __SUPPORT_LD_DEBUG__ +# define _dl_debug_file 2*/ #endif /* __SUPPORT_LD_DEBUG__ */ #ifdef IS_IN_rtld @@ -149,8 +150,19 @@ extern void *_dl_realloc(void *__ptr, size_t __size); extern void _dl_free(void *); extern char *_dl_getenv(const char *symbol, char **envp); extern void _dl_unsetenv(const char *symbol, char **envp); +#ifdef IS_IN_rtld extern char *_dl_strdup(const char *string); extern void _dl_dprintf(int, const char *, ...); +#else +# include <string.h> +# define _dl_strdup strdup +# include <stdio.h> +# ifdef __USE_GNU +# define _dl_dprintf dprintf +# else +# define _dl_dprintf(fd, fmt, args...) fprintf(stderr, fmt, ## args) +# endif +#endif #ifndef DL_GET_READY_TO_RUN_EXTRA_PARMS # define DL_GET_READY_TO_RUN_EXTRA_PARMS |