dlsym call fails

2011-07-21 Thread manish kumar
Hi, #mipsel-linux-uclibc-gcc -g -W -Wall -lpthread -o free_twice free_twice.cpp wrapper.c (test case is attached in-line to this mail) The attached test case fails with this version of uClibc based toolchain: $ mipsel-linux-uclibc-gcc -v Using built-in specs. COLLECT_GCC=mipsel-linux-uclibc-gc

Re: dlsym call fails

2011-07-21 Thread Kevin Cernekee
On Thu, Jul 21, 2011 at 2:52 AM, manish kumar wrote: >        if(!libc_malloc) >                libc_malloc = (void *(*)(size_t))dlsym(RTLD_NEXT, "malloc"); > dlerror(); You probably want braces here, but that is not a likely cause of the reported problem. I have seen cases where uClibc dlsym(R

Re: dlsym call fails

2011-07-22 Thread manish kumar
On Fri, Jul 22, 2011 at 10:36 AM, Kevin Cernekee wrote: > On Thu, Jul 21, 2011 at 2:52 AM, manish kumar > wrote: >>        if(!libc_malloc) >>                libc_malloc = (void *(*)(size_t))dlsym(RTLD_NEXT, "malloc"); >> dlerror(); > > You probably want braces here, but that is not a likely ca