【问题标题】:why functions representation as dynamic symbols is not consistent (RH4, Solaris10 give different results)为什么函数表示为动态符号不一致(RH4,Solaris10给出不同的结果)
【发布时间】:2014-08-02 16:25:29
【问题描述】:

在尝试从共享对象 (libcurl.so) 链接函数时,我收到“对 `Curl_base64_decode' 的未定义引用”。这只发生在 RH4 上编译 libcurl 时,但当我在 solaris10 上编译时,我没有收到任何错误。

看起来在 solaris 10 中函数是动态的,而在 RH4 上不是。

Solaris10:
-bash-3.2$  nm -D libcurl.so | grep Curl_base
url_base64_decode
Curl_base64_encode

RH4:
-bash-3.2$  nm -D libcurl.so | grep Curl_base
*no results

【问题讨论】:

    标签: gcc linker linker-errors libcurl ld


    【解决方案1】:

    Redhat 版本可能只是简单地链接以隐藏内部符号,而 Solaris 版本则没有。就像使用 ./configure --enable-symbol-hiding 构建一样。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-09
      相关资源
      最近更新 更多