I'm having a linking problem. I need to link against a shared library libfoo.so
that depends on a function read
which I would like to define myself in the file read.c.
I compile and link everything together but at runtime I get the error
/home/bar/src/libfoo.so: undefined symbol: sread.
nm reports the symbol is defined
$nm baz | grep sread
00000000000022f8 t sread
but ldd reports the symbol is undefined
$ldd -r baz | grep sread
undefined symbol: sread (/home/bar/src/libfoo.so)
What gives? Is there some isse with the fact that libfoo.so is a shared library?