ld frage

Dennis Wetzig dennis at osiris.gt.owl.de
Sun Jun 11 16:42:47 CEST 2000


Hi, 

	wie kann ich mit ld mehrere Objekte zu einem ausfuehrbaren Binary
linken?

test.c ist ein Programm, dass nur in main() einmal printf() aufruft.

%gcc -c test.c
%ld -o test test.o

geht nicht. Fehler:

ld: warning: cannot find entry symbol _start; defaulting to 08048080
test.o: In function `main':
test.o(.text+0x9): undefined reference to `printf'


Ich habe bisher immer nur shared libraries mit ld gebaut, und bin irgendwie
irritiert von der 1. Zeile im stderr ;-)

Danke, 
		

-- 
- Dennis

--------
Dennis Wetzig - dennis at osiris.gt.owl.de
keyID=0x8FFC43DB fingerprint=685D 6F5A BF5A 00CD EF96 7B8A C313 EB47 8FFC 43DB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20000611/4782c6f1/attachment.sig>


More information about the Linux mailing list