On 5/22/06, Joco Salvatti <[EMAIL PROTECTED]> wrote:
I'm developing a small program that uses an assembly routine. It is
compiled and executed normally. But I've done some changes in the
routine, more specifically changing the system calls, such as write,
by libc functions, such as fprintf and exit. Then everytime I try to
run the program I have the following error message:
printf undefined reference
exit undefined reference
This routine is not inline , it is a separated module built in
assembly. Does anyone know how to build this program using libc
routines? I've used the following command line to compile the code:
as procedure.S -o procedure.o
ld -Bdynamic -dynamic-linker /usr/libexec/ld.so procedure.o -o procedure -lc
/usr/lib/libc.so.39.0: undefined reference to `environ'
/usr/lib/libc.so.39.0: undefined reference to `__progname'
link with gcc -o procedure procedure.o