diff --git a/packages/toolchain/devel/uClibc/patches/30_dlsym-verbose-dev.diff b/packages/toolchain/devel/uClibc/patches/30_dlsym-verbose-dev.diff new file mode 100644 index 0000000000..ae2ea1c2fc --- /dev/null +++ b/packages/toolchain/devel/uClibc/patches/30_dlsym-verbose-dev.diff @@ -0,0 +1,26 @@ +* When DEBUG=yes in config/options, allows creation of the file +/dlsym.log which contains all the symbols from libraries that +are accessed via dlopen()/dlsym()/dlclose() procedure (and so +the symbols are not directly accessible from the resulting binary). + +Intended use is to create a file which can be sort|uniq'd into an +alphabetically-ordered list, so that libstrip can be used on those +libraries that are used by programs that use dlsym(), without +stripping out required symbols. + +--- uClibc/ldso/libdl/libdl.c 2007-02-05 03:01:12.000000000 +0900 ++++ uClibc/ldso/libdl/libdl.c 2007-02-05 03:05:10.000000000 +0900 +@@ -406,6 +406,13 @@ + #else + const char *name2 = name; + #endif ++#ifdef _DLSYM_TRACE_NAME ++ FILE *log = fopen("/var/log/dlsym.log", "a"); ++ ++ fprintf(log, "%s\n", name); ++ fflush(log); ++ fclose(log); ++#endif + handle = (struct dyn_elf *) vhandle; + + /* First of all verify that we have a real handle