This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Warning of "ld"


On Mon, May 28, 2007 at 12:56:28AM +0430, Arash Razmjoo wrote:
>Hello developers
>I wrought a single program in C,compiled it with gcc 3.2.2 20030222 with 
>this command:
>
> gcc -c test4.c
>
>and  "gcc" gave me an object file "test4.o" without any messages.Then I 
>tried to link it with ld 2.13.90.0.18 with this instruction:
>
>ld test4.o -lc -o test4
>
>but "ld" has gave me this message:
>
>ld: Warning: cannot find entry symbol _start; defaulting to 08048184
>
>When i tried to run "test4",this message appeard:
>
>bash2: /home/.../test4: usr/lib/libc.so.1: bad ELF interpreter: No such 
>file or directory
>
>Now please tell me it is caused by "gcc" or "ld" ?

You need to use gcc to link your final program:

gcc -o test4 test4.o

Don't use ld directly unless you really know what you're doing.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]