diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/patchelf.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc index d5175a2..435e157 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -80,6 +80,8 @@ private: } }; + friend CompShdr; + void sortShdrs(); void shiftFile(unsigned int extraPages, Elf_Addr startPage); @@ -138,6 +140,26 @@ private: }; +/* Some old versions of elf.h lack some required macros, so define + them if they're missing. */ +#ifndef ELFMAG +#define ELFMAG "\177ELF" +#define SELFMAG 4 +#endif + +#ifndef DT_VERNEED +#define DT_VERNEED 0x6ffffffe +#endif + +#ifndef DT_VERNEEDNUM +#define DT_VERNEEDNUM 0x6fffffff +#endif + +#ifndef DT_VERSYM +#define DT_VERSYM 0x6ffffff0 +#endif + + static void debug(const char * format, ...) { if (debugMode) { |