On Wed, Dec 19, 2001 at 03:09:52PM +0000, amundsen roald wrote: Not a kernel related question, please use another mailing list next time. > I want to use 'ld' to link object files. Followed the manuals of ld: > ld -o image /lib/crt0.o dodo getmem.o -lc Why would you want to do that? Gcc can do that perfectly well. > But there is no crt0.o in either /lib or /usr/lib. After I got rid of the > '/lib/crt0.o' param, it displayed error: > ld: warning: cannot find entry symbol _start; defaulting to 08048190 > getmem.o: In function 'main': > getmem.o(.text+0x7):undefined reference to 'get_memsize' > make: *** [all] Error 1 > > The environment is egcs-1.1.2, linux kernel 2.2.5. > I sure that get_memsize is defined in dodo. > I wonder whether crt0.o is needed. Which package does it belong to? Try "gcc -v -o image getmem.o" and gcc will tell you exactly what it does. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A.K.Mouw@its.tudelft.nl WWW: http://www-ict.its.tudelft.nl/~erik/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/