diff options
-rw-r--r-- | src/oh-strip | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/oh-strip b/src/oh-strip index e3ae500..9e11f75 100644 --- a/src/oh-strip +++ b/src/oh-strip @@ -63,10 +63,15 @@ if [ ${#} -eq 0 ]; then exit 1 fi +# Iterate over object files. while [ ${#} -gt 0 ]; do if ${make_dbg_pkg}; then + # Copy debugging symbols into a debugging object file and add a GDB link + # from the original object file to the debugging object file. objcopy --only-keep-debug "dest/${1}" "dest/usr/lib/debug/${1}" objcopy --add-gnu-debuglink="/usr/lib/debug/${1}" "dest/${1}" fi + # Strip the object file of symbols. + # TODO: If the file is not a library, strip it of all symbols. strip -g "dest/${1}" done |