Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Aug 2005 04:29:18 +0100
From:      Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>
To:        freebsd-questions@freebsd.org
Subject:   Linking standalone NASM binary with libc
Message-ID:  <20050830032917.GA39730@dogma.freebsd-uk.eu.org>

next in thread | raw e-mail | index | archive | help

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
-- 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050830032917.GA39730>