diff options
author | 2018-07-23 21:57:28 +0200 | |
---|---|---|
committer | 2018-07-23 22:10:30 +0200 | |
commit | 371aa4a56ae00a49380080a685e408e1736488f5 (patch) | |
tree | 3239d72fe93839e2fc200fceb14771504d37166b | |
parent | 57d293ab1fe34be609a4580539132bda44fa1352 (diff) | |
download | paludis-371aa4a56ae00a49380080a685e408e1736488f5.tar.gz paludis-371aa4a56ae00a49380080a685e408e1736488f5.tar.xz |
Adjust the stripper for file>=5.33 and PIE executables
It can recognize executables built with PIE now, which are just
shared objects with the executable bit set (and were recognized by
stripper via the "shared object" text returned from earlier
versions).
With file 5.32:
$ file .../file: ".../file: ELF 64-bit LSB shared object"
$ file .../libmagic.so.1.0.0: ".../libmagic.so.1.0.0: ELF 64-bit LSB
shared object"
With file 5.33:
$ file .../file: ".../file: ELF 64-bit LSB pie executable x86-64"
$ file .../libmagic.so.1.0.0: ".../libmagic.so.1.0.0: ELF 64-bit LSB
pie executable x86-64"
-rw-r--r-- | paludis/stripper.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/paludis/stripper.cc b/paludis/stripper.cc index c9d2a9d3c..7e8f34160 100644 --- a/paludis/stripper.cc +++ b/paludis/stripper.cc @@ -197,7 +197,8 @@ Stripper::do_dir_recursive(const FSPath & f) (d->basename() != strip_trailing_string(d->basename(), ".so"))) { std::string t(file_type(*d)); - if (std::string::npos != t.find("SB executable") || std::string::npos != t.find("SB shared object")) + if (std::string::npos != t.find("SB executable") || std::string::npos != t.find("SB shared object") || + std::string::npos != t.find("SB pie executable")) { if (_imp->options.dwarf_compression()) do_dwarf_compress(*d); |