I have the following problem. I'm trying to build tiny smb client on the base of the "libdsm" project. I have built necessary libraries (libdsm.a and libtasn1.a). My smb client sees these static libraries but linker informs me that I have undefined reference. This message is clear for me and I have verified that linked static library exists etc. I have no idea why it is happened. Are there any reasons why linker tells it? Which tools could I use to analyze this problem deeper? Below I show readelf information for built library
File: libdsm.a(md4.o)
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          15128 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           64 (bytes)
  Number of section headers:         23
  Section header string table index: 20
   17: 0000000000000000    97 FUNC    GLOBAL DEFAULT    1 smb_session_new
    18: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND calloc
    19: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND smb_buffer_init
    20: 0000000000000070    93 FUNC    GLOBAL DEFAULT    1 smb_session_destroy
    21: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND smb_session_share_clear
    22: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND asn1_delete_structure
    23: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND smb_buffer_free
    24: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND free
    25: 00000000000000d0   141 FUNC    GLOBAL DEFAULT    1 smb_session_set_creds
    26: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND __strndup
    27: 0000000000000160   463 FUNC    GLOBAL DEFAULT    1 smb_session_connect
    28: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND smb_transport_nbt
and object file of my tiny smb client:
ELF Header:
Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          2744 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           64 (bytes)
  Number of section headers:         15
  Section header string table index: 12
Symbol table '.symtab' contains 26 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
    12: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z15smb_session_newv
    13: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND inet_aton
    14: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z19smb_session_connectP1
    15: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z21smb_session_set_creds
    16: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z17smb_session_loginP11s
    17: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND puts
    18: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z16smb_tree_connectP11sm
    19: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z9smb_fopenP11smb_sessio
    20: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z9smb_freadP11smb_sessio
    21: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z10smb_fcloseP11smb_sess
    22: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z19smb_tree_disconnectP1
    23: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _Z19smb_session_destroyP1
I hope that this additional information will be useful.
 
    