c程式找不到函示庫 ld錯誤 函示庫各種雜症

signal SIGSEGV: address not mapped to object (fault address: 0x20)

static function不需要被呼叫就有可能發生錯誤

dlopen無法載入函示庫

https://stackoverflow.com/a/2991677/22299707

  1. ldd -r 列出所以找不到的函式庫像這樣

    1
    2
    3
    4
    5
    6
            linux-vdso.so.1 (0x00007ffcfd376000)
    libjson-glib-1.0.so.0 => /lib/x86_64-linux-gnu/libjson-glib-1.0.so.0 (0x00007f210d72c000)
    .....
    undefined symbol: descriptor_table_google_2fprotobuf_2ftimestamp_2eproto (./libnvds_msgconv.so)
    undefined symbol: _ZN6google8protobuf7Message17CopyWithSizeCheckEPS1_RKS1_ (./libnvds_msgconv.so)
    .....
  2. c++filt顯示函式庫名稱,還原函數名稱

    1
    c++filt _ZN6google8protobuf7Message17CopyWithSizeCheckEPS1_RKS1_

c程式找不到函示庫 ld錯誤 函示庫各種雜症

https://jenhaoyang.github.io/uncategorized/538553d2692f/

Author

Steven

Posted on

2024-01-04

Updated on

2025-01-14

Licensed under

Comments