CMake 在 Linux 到 work/modify 二进制文件的 RPATH 上使用什么?

What does CMake use on Linux to work/modify RPATH of binaries?

CMake 在 Linux 上使用什么来工作 with/modify 二进制文件的 RPATH?

我需要知道它才能安装缺少的包。

有人知道吗?

问题是:

What does CMake use on Linux to work/modify RPATH of binaries?

file(RPATH_CHECK

file 来自 cmFileCommand.cxx calls cmSystemTools::CheckRPath which calls cmELF::getRPath which calls CMELFInternal::GetRPath which calls GetDynamicSectionString which calls cmELFInternal::LoadDynamicSection which just seekg the file stream and reads from the stream in cmELFInternal::Read,然后可选择反转字节顺序。

types are used from elf.h.

file(RPATH_CHANGE

调用 cmSystemTools::ChangeRPath which appends the RPATH together with existing one and calls AdjustRPathELF which calls RemoveRPathELF which just fills RPATH part of DYNAMIC section with zeros and then uses standard operator<< to write new RPATH

所以:CMake使用文件操作- open write read.

what does CMake need to work with RPATH.

没有。嗯,一个工作的底层存储文件系统和内核。