mirror of
https://github.com/audacity/linuxdeploy.git
synced 2025-12-11 05:46:48 -06:00
Do not set rpath in statically linked or debug symbols ELF files
This commit is contained in:
parent
3c6096433d
commit
1d534d2b32
@ -215,10 +215,16 @@ namespace linuxdeploy {
|
||||
const auto& filePath = currentEntry.first;
|
||||
const auto& rpath = currentEntry.second;
|
||||
|
||||
elf_file::ElfFile elfFile(filePath);
|
||||
|
||||
// no need to set rpath in debug symbols files
|
||||
// also, patchelf crashes on such symbols
|
||||
if (isInDebugSymbolsLocation(filePath)) {
|
||||
ldLog() << LD_WARNING << "Not setting rpath in debug symbols file:" << filePath << std::endl;
|
||||
if (isInDebugSymbolsLocation(filePath) || elfFile.isDebugSymbolsFile()) {
|
||||
ldLog() << LD_WARNING << "Not setting rpath in debug symbols file:" << filePath
|
||||
<< std::endl;
|
||||
} else if (!elfFile.isDynamicallyLinked()) {
|
||||
ldLog() << LD_WARNING << "Not setting rpath in statically-linked file: " << filePath
|
||||
<< std::endl;
|
||||
} else {
|
||||
ldLog() << "Setting rpath in ELF file" << filePath << "to" << rpath << std::endl;
|
||||
if (!elf_file::ElfFile(filePath).setRPath(rpath)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user