I have a trivial static library prepared from two object files
ld -shared -o libfoobar.so foo.o bar.oWhen I check the type of the library file with the file utility, it reports that the library is dynamically linked:
file libfoobar.so
# libfoobar.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, with debug_info, not strippedWhen I ask the same (?) question using ldd, it reports that the library is statically linked:
ldd libfoobar.so
# statically linkedHow should I reconcile these two outputs?
uname -a
# Linux leo 4.15.0-124-generic #127-Ubuntu SMP Fri Nov 6 10:54:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux 5 Reset to default