Hi Philippe,
Below is part of Make file where I have done the Linking:

sslLIB=$(OUT_DIR)/libsyfer_ssl.a

# pull in dependency info for *existing* .o files
*********************************
-include $(commonOBJS:.o=.d)
-include $(sslOBJS:.o=.d)
-include $(cliCOMMONOBJS:.o=.d)
-include $(cliCLIOBJS:.o=.d)
-include $(cliSYFERSERVEROBJS:.o=.d)
-include $(cliSYFERCARDSERVEROBJS:.o=.d)
-include $(cliETHSERVERSERVEROBJS:.o=.d)

all: $(OUT_DIR)/$(OUTNAME) $(OUT_DIR)/cli

$(OUT_DIR)/cli : $(cliCOMMONOBJS) $(cliCLIOBJS)
    @echo "LL $(LOPTS) $@" $(REDIRECT)
    $(SILENT)$(LL) $(LOPTS) $(cliCOMMONOBJS) $(cliCLIOBJS)  -o cli -lpthread

$(OUT_DIR)/$(OUTNAME): $(VERSION_FILE) $(commonOBJS) $(sslLIB) $(cliCOMMONOBJS) 
$(cliSYFERSERVEROBJS)
    @echo "LL $(LOPTS) $@" $(REDIRECT)
    $(SILENT)$(LL) $(LOPTS) $(commonOBJS) $(cliCOMMONOBJS) 
$(cliSYFERSERVEROBJS) ./libs/librohc.a $(LIB_GLIB_DIR)/libglib-2.0.a 
./libs/libsnutils.a ./libs/libcommon.a ./libs/libasnbase.a ./libs/libs1apgen.a 
./libs/libsctp.a ./libs/libpcap.a $(LIB_PATH) -lssp -lsyfer_ssl -lcrypto 
-leventbridge -ldl -o $(OUTNAME)

$(OUT_DIR)/syfercard : $(cliCOMMONOBJS) $(cliSYFERCARDSERVEROBJS)
    @echo "LL $(LOPTS) $@" $(REDIRECT)
    $(SILENT)$(LL) $(LOPTS) $(cliCOMMONOBJS) $(cliSYFERCARDSERVEROBJS)  -o 
syfercard

$(OUT_DIR)/ethserver : $(cliCOMMONOBJS) $(cliETHSERVERSERVEROBJS)
    @echo "LL $(LOPTS) $@" $(REDIRECT)
    $(SILENT)$(LL) $(LOPTS) $(cliCOMMONOBJS) $(cliETHSERVERSERVEROBJS)  -o 
ethserver -lpthread

*********************************

Could you please comments on this.
What modification I need to do here ?

Thanks,
Sanjay

-----Original Message-----
From: Philippe Waroquiers [mailto:philippe.waroqui...@skynet.be] 
Sent: Thursday, June 13, 2013 1:38 AM
To: David Chapman
Cc: Sanjay Kumar (sanjaku5); valgrind-users@lists.sourceforge.net
Subject: Re: [Valgrind-users] Why doesn't valgrind detect a memory leak for my 
application

Sanjay,
> > --11597--    object doesn't have a dynamic symbol table
With the above
and the below stacktrace, it looks like this application is statically linked 
(or at least, the malloc lib is statically linked).
valgrind can find leaks if malloc lib is statically linked (you need to use 
--soname-synonyms=.... to indicate malloc is statically linked).
However, a completely statically linked application causes other problems.
You should have at least one (even dummy) dynamically linked lib to have the 
dynamic loader be invoked in your process otherwise valgrind cannot 
"LD_PRELOAD" some of its own .so.

Philippe

> > ==11597== Conditional jump or move depends on uninitialised value(s)
> > 
> > ==11597==    at 0x8A838B5: __register_atfork
> > (in /usr/local/flare/flare)
> > 
> > ==11597==    by 0x8A68074: ptmalloc_init (in /usr/local/flare/flare)
> > 
> > ==11597==    by 0x8A6C265: malloc_hook_ini
> > (in /usr/local/flare/flare)
> > 
> > ==11597==    by 0x8A6BDCE: malloc (in /usr/local/flare/flare)
> > 
> > ==11597==    by 0x8AA893B: _dl_init_paths
> > (in /usr/local/flare/flare)
> > 
> > ==11597==    by 0x8A8BDBB: _dl_non_dynamic_init
> > (in /usr/local/flare/flare)
> > 
> > ==11597==    by 0x8A8CA75: __libc_init_first
> > (in /usr/local/flare/flare)
> > 
> > ==11597==    by 0x8A3E460: (below main) (in /usr/local/flare/flare)



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to