aboutsummaryrefslogtreecommitdiff
path: root/paludis/stripper.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-27 18:52:15 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-27 19:06:34 +0000
commit9e8be8c45a36e9f53a586a79acb726d74f5c687b (patch)
tree3de8c1295ab9c7910197246a2e246efc70168a52 /paludis/stripper.cc
parent899374110f3929278af84f575ebaeff039439bdb (diff)
downloadpaludis-9e8be8c45a36e9f53a586a79acb726d74f5c687b.tar.gz
paludis-9e8be8c45a36e9f53a586a79acb726d74f5c687b.tar.xz
Support compressing split debug symbols
Diffstat (limited to 'paludis/stripper.cc')
-rw-r--r--paludis/stripper.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/paludis/stripper.cc b/paludis/stripper.cc
index fae2a23a3..49e5805ef 100644
--- a/paludis/stripper.cc
+++ b/paludis/stripper.cc
@@ -267,8 +267,13 @@ Stripper::do_split(const FSPath & f, const FSPath & g)
std::for_each(to_make.begin(), to_make.end(), std::bind(std::mem_fn(&FSPath::mkdir), _1, 0755, FSPathMkdirOptions() + fspmkdo_ok_if_exists));
}
- Process objcopy_copy_process(ProcessCommand({ "objcopy", "--only-keep-debug", stringify(f), stringify(g) }));
+ ProcessCommand objcopy_copy_process_args({ "objcopy", "--only-keep-debug", stringify(f), stringify(g) });
+ if (_imp->options.compress_splits())
+ objcopy_copy_process_args.append_args({ "--compress-debug-sections" });
+ Process objcopy_copy_process(std::move(objcopy_copy_process_args));
+
Process objcopy_link_process(ProcessCommand({ "objcopy", "--add-gnu-debuglink=" + stringify(g), stringify(f) }));
+
if (0 != objcopy_copy_process.run().wait())
Log::get_instance()->message("strip.failure", ll_warning, lc_context) << "Couldn't copy debug information for '" << f << "'";
else if (0 != objcopy_link_process.run().wait())