linux - Linux ELF 上的 BIND_NOW 是什么?

标签 linux

在解析从共享库派生的函数时,我遇到了一个问题,我意识到这个问题与 BIND_NOW 有关,它是 ELF 的安全功能之一。

由于网上没有足够的信息,我暂时不能更进一步。什么是 BIND_NOW

最佳答案

意思是在加载对象的时候就解析符号(而不是在使用的时候解析,这叫惰性绑定(bind))

引自man 3 dlopen:

One of the following two values must be included in flag:

   RTLD_LAZY
          Perform lazy binding.  Only resolve symbols as the code that
          references them is executed.  If the symbol is never
          referenced, then it is never resolved.  (Lazy binding is
          performed only for function references; references to
          variables are always immediately bound when the library is
          loaded.)

   RTLD_NOW
          If this value is specified, or the environment variable
          LD_BIND_NOW is set to a nonempty string, all undefined symbols
          in the library are resolved before dlopen() returns.  If this
          cannot be done, an error is returned.

已编辑:另见 this link ,这是我在谷歌搜索时发现的。

关于linux - Linux ELF 上的 BIND_NOW 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21981534/

相关文章:

c++ - 错误 :expected unqualified-id before '=' token

linux - 在 Bash 中填充变量时没有这样的文件或目录

linux - 应用程序中的符号链接(symbolic link)生命周期

linux - 如何使用 wget 和 ftp 从我的列表中下载文件

linux - bash - 散列变量的二进制内容而不创建文件

php - 如何在单个服务器上运行多个 php 版本

c - 使用 execl 命令

linux - 为什么找不到我的命令但在命令行中有效?

linux - 监视(嗅探)/dev/ttyUSB0 由 FTDI USB Serial Converter 创建

linux - 启动 jupyter-pyspark 内核时生成损坏的文件