include $(TOPDIR)Rules.mak
LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so
+# Enable this to enable all the code needed to support traditional ldd
+# (i.e. where the shared library loader does all the heavy lifting)
+# Since this currently only saves about 300 bytes, I'm going to leave
+# it enabled...
+XXFLAGS+= -DDL_TRACE
+
# Enable this to enable debugging output from ld.so
#XXFLAGS+= -DDL_DEBUG
#XXFLAGS+= -DDL_DEBUG_SYMBOLS
static char *_dl_not_lazy = 0;
static char *_dl_malloc_addr, *_dl_mmap_zero;
-#ifdef DL_TRACE
static char *_dl_trace_loaded_objects = 0;
-#endif
static int (*_dl_elf_main) (int, char **, char **);
static int (*_dl_elf_init) (void);
void *(*_dl_malloc_function) (int size) = NULL;
}
}
-#ifdef DL_TRACE
_dl_trace_loaded_objects = _dl_getenv("LD_TRACE_LOADED_OBJECTS", envp);
+#ifndef DL_TRACE
+ if (_dl_trace_loaded_objects) {
+ _dl_dprintf(2, "Use the ldd provided by uClibc\n");
+ _dl_exit(1);
+ }
#endif
/* OK, we now have the application in the list, and we have some
basic stuff in place. Now search through the list for other shared
if (_dl_trace_loaded_objects) {
char *_dl_warn = 0;
+ _dl_dprintf(1, "\t%s => %s (0x%x)\n", tpnt->libname + (_dl_strlen(_dl_ldsopath)) + 1,
+ tpnt->libname, tpnt->loadaddr);
_dl_warn = _dl_getenv("LD_WARN", envp);
if (!_dl_warn)
_dl_exit(0);