gcc에서 link가 되지 않습니다.
안녕하세요.
갑자기 gcc가 obj파일은 만드는 것 같은데
link가 되지 않은것 같습니다.
아래는 컴파일 했을 때 내용이고요. 어떻게 하면 되죠..
[root@localhost test]# cc ex2-1.c
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crti.o In function `_init'
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crti.o(.init+0x0) multiple definition of `_init'
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crt1.o(.init+0x0) first defined here
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crti.o In function `_fini'
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crti.o(.fini+0x0) multiple definition of `_fini'
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crt1.o(.fini+0x0) first defined here
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crti.o(.got.plt+0x0) multiple definition of `_GLOBAL_OFFSET_TABLE_'
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crt1.o(.got+0x0) first defined here
/tmp/ccDQoPHe.o In function `main'
/tmp/ccDQoPHe.o(.text+0x0) multiple definition of `main'
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crt1.o(.text+0xe0) first defined here
/usr/bin/ld Warning size of symbol `main' changed from 193 to 94 in /tmp/ccDQoPHe.o
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crti.o(.dynamic+0x0) multiple definition of `_DYNAMIC'
/usr/lib/gcc-lib/i686-pld-linux/3.0.3/../../../crt1.o(.dynamic+0x0) first defined here
/usr/bin/ld warning cannot find entry symbol _start; defaulting to 08048b80
collect2 ld returned 1 exit status
Re: gcc에서 link가 되지 않습니다.
binutils팩키지에 문제가 있는듯,다시 빌드하는게 좋을거 같은데..
혹시 쓰고있는 배포본이 데비안 계열?
댓글 달기