chandru1248 <chandru1248@xxxxxxxxx> writes: >> You could use objdump -s -j SECTIONNAME to check that the section has the >> right >> contents. If those all look correct, then you will need to look at your >> loader to see what it is doing and why it is not working as expected. > > Thanks for the info. > > As you mentioned I checked the data section and the values are correct in > the symbol table. So I think there is something wrong with the loader. > > Apart from that I have noticed one thing in diab. I have a function called > __init() which is actually initializing the varibles in case of diab. But in > case of GCC it is not happening properly. > > Is that anything has to be done for GCC to make it work. Can you please tell > me your suggestion on this. As far as I can tell all your issues are about your loader and perhaps your library startup code. Neither is part of GCC. I don't think there is a GCC answer to your question. Ian