Linking always generates _dl undefines
Zack Weinberg
zack@rabi.columbia.edu
Tue Sep 15 19:32:00 GMT 1998
On Tue, 15 Sep 1998 17:36:15 -0700, Dan Christian wrote:
>
>egcs -o hello -O -I/usr/local/include hello.c -L/usr/local/lib
>/usr/local/lib/libc.so.6: undefined reference to `_dl_profile_output'
>/usr/local/lib/libc.so.6: undefined reference to `__libc_stack_end'
[...]
You need to link your program like this:
egcs -o hello -O -I/usr/local/include hello.c -B/usr/local/lib/ \
-Wl,-dynamic-linker,/usr/local/lib/ld-linux.so.2 \
ld-linux.so.2
>Also, linking with -static will generate an executable that always
>core dumps.
In this case you need to do it like this:
egcs -static -o hello hello.c -I/usr/local/include -B/usr/local/lib/
zw
More information about the Libc-alpha
mailing list