Linking standalone NASM binary with libc

Jonathon McKitrick jcm at FreeBSD-uk.eu.org
Tue Aug 30 03:29:27 GMT 2005


Hi all,

I'm doing some experimentation with assembly code based on the int80h.org 
tutorials.  But since I am going to use malloc and some other functions,
I need to make my code link with libc rather than stand totally on its own.

ld -s -o foo foo.o -lc

leaves 'environ' and '__progname' undefined.  What is the correct way to link
standalone asm code with needed libraries?

jm
-- 


More information about the freebsd-questions mailing list