thanks for the hint. I finally found the problem. we had used linker script in our program. in the managed make, we had passed the command as -Wl,-script while in the make file we had not passed this command and hence the object data allocation was erratic which had caused this problem.

thank you all for all the useful hints which helped me to track this problem.