suppress splitdebug for .o files

BUG=chromium-os:21932,chromium:305263
TEST=cbuildbot run of an arm builder, checking python.o after dump_syms
     runs against it
TEST=`emerge-x86-alex chromeos-kernel` no longer throws errors during stripping
TEST=`emerge-x86-alex chromeos-kernel` has split debug files for kernel modules
TEST=`emerge-x86-alex python` does not have debug file for python.o, and lacks debug sections
TEST=`emerge-x86-alex chromeos-base/autotest-deps-libaio` does not have debug file for raw_syscall.os, and lacks debug sections
TEST=`cros_generate_breakpad_symbols --board x86-alex` still works

https://gerrit.chromium.org/gerrit/10451
https://gerrit.chromium.org/gerrit/42997
https://chromium-review.googlesource.com/214525
https://chromium-review.googlesource.com/815658

Change-Id: Iebd21d4b4a544efa920fc9850d34c2e9fe9240b6
Reviewed-on: https://chromium-review.googlesource.com/c/1377101
Commit-Queue: Allen Webb <allenwebb@google.com>
Tested-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/bin/estrip b/bin/estrip
index 5709b86..28ddd1f 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -431,7 +431,12 @@
 		${f} == *"SB shared object"* ]] ; then
 		process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS}
 	elif [[ ${f} == *"SB relocatable"* ]] ; then
+		# Disable splitdebug for object files as breakpad fails atm w/them.
+		# http://crosbug.com/204974
+		FEATURES_splitdebug_save=${FEATURES_splitdebug}
+		[[ ${x} != *.ko ]] && FEATURES_splitdebug=false
 		process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS}
+		FEATURES_splitdebug=${FEATURES_splitdebug_save}
 	fi
 
 	if ${was_not_writable} ; then