I think we are missing something like we need get address of each sections like .text , .data etc.. according to that we need to copy(is it right??). But how to get this address location information?Or is there any procedure to do that?