public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* why ld return with error?
@ 2011-01-31  5:02 ali hagigat
  2011-01-31  7:17 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: ali hagigat @ 2011-01-31  5:02 UTC (permalink / raw)
  To: Ian Lance Taylor, binutils

I have the following files:
prog3.c
#include <stdio.h>
main(){
	printf("uuuuuu\n");
}
prog3.ld
ASSERT(1,"there is not an error");
Then :
gcc -c prog3.c -o prog3.o
ld prog3.o prog3.ld -o prog3

ld: warning: cannot find entry symbol _start; defaulting to 0000000008048074
prog3.o: In function `main':
prog3.c:(.text+0x11): undefined reference to `puts'
------------------------------------------------------------------------
I want to force gcc (or ld) to use its built-in functions as printf
and puts(not to use the standard library functions like libc.a or
libc.so). how can i do it?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-31  9:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-31  5:02 why ld return with error? ali hagigat
2011-01-31  7:17 ` Ian Lance Taylor
2011-01-31  8:28   ` ali hagigat
2011-01-31  9:00     ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).