This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Problem in assembly and linking(gcc-4.0)
- From: Virender Kashyap <virenk at cse dot iitb dot ac dot in>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 21 May 2005 23:38:52 +0530 (IST)
- Subject: Problem in assembly and linking(gcc-4.0)
Hi
I am working on gcc-4.0. I have edited some files in code and the
remaking of gcc works well, and even files compile with it. But when i try
to run a compiled program it gives segmentaion fault. I checked
that assembly code produced is fine and i just compiled file to file.s and
then assembled and linked it using standard commands in unix, as :
gcc -S file.c
as -o file.o file.s
ld -o exefile file.o /usr/lib/crt1.o /usr/lib/crti.o -lc /usr/lib/crtn.o
-dynamic /lib/ld-linux.so.2
The executable produced above works fine.
This would mean that there is some problem occuring while assembling or
linking in regualr commands used by gcc. is there a solution for this ?
Regards.
Virender