ld frage

Ingo Luetkebohle ingo at devcon.net
Sun Jun 11 17:21:07 CEST 2000


On Sun, Jun 11, 2000 at 04:42:47PM +0200, Dennis Wetzig wrote:
> wie kann ich mit ld mehrere Objekte zu einem ausfuehrbaren Binary
> linken?

Du willst nicht ld direkt aufrufen, weil die Optionen dafuer zu
systemspezifisch sind. Was spricht dagegen, das executable mit dem gcc zu
erzeugen? z.B. so:
	gcc -o hello hello.o

(test als Programmname ist auch ein beliebter Fehler. Sollte man nicht
machen, da es das Kommando "test" bereits gibt).

> ld: warning: cannot find entry symbol _start; defaulting to 08048080

Das Symbol "_start" gibts in Deinem Programm auch nicht. Das ist die
wirkliche main-Routine, die der Systemloader aufruft und innerhalb der dann
das 'C'-main aufgerufen wird.

---Ingo Luetkebohle / 21st Century Digital Boy

just because you're paranoid doesn't mean they are not after you
-------------- 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/616adfdf/attachment.sig>


More information about the Linux mailing list