From 7146a6042991ca5ac49d400cf94d0feb2b8ae4ab Mon Sep 17 00:00:00 2001 From: Maya Rashish Date: Wed, 26 Apr 2017 16:37:28 +0300 Subject: cmELF: Define DT_RUNPATH if it isn't already defined The value of 29 is used by binutils and is used in the System V ABI draft from 2001. It isn't defined on NetBSD 6.0. --- Source/cmELF.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 2a8137f..084cf4a 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -44,6 +44,9 @@ typedef struct Elf32_Rela Elf32_Rela; #ifdef _SCO_DS #include // For DT_SONAME etc. #endif +#ifndef DT_RUNPATH +#define DT_RUNPATH 29 +#endif // Low-level byte swapping implementation. template -- cgit v0.12 From 370a6b1bc525aa5b3a7308caf3347dd4b4267db0 Mon Sep 17 00:00:00 2001 From: Maya Rashish Date: Wed, 26 Apr 2017 16:43:40 +0300 Subject: cmELF: Remove now-redundant check for DT_RUNPATH's existence We define it if it's not already defined. --- Source/cmELF.cxx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 084cf4a..d23abec 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -157,11 +157,7 @@ public: // Lookup the RUNPATH in the DYNAMIC section. StringEntry const* GetRunPath() { -#if defined(DT_RUNPATH) return this->GetDynamicSectionString(DT_RUNPATH); -#else - return 0; -#endif } // Return the recorded ELF type. -- cgit v0.12