allow split debuf for kernel modules (trunk r7193)
authorZac Medico <zmedico@gentoo.org>
Sun, 8 Jul 2007 01:16:37 +0000 (01:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 8 Jul 2007 01:16:37 +0000 (01:16 -0000)
svn path=/main/branches/2.1.2/; revision=7194

bin/prepstrip

index 539eba2f15162791443bf42378ae8e3270bbe8b9..e7b07c7aa84e35e682a7d2f1e6520a92cb81742e 100755 (executable)
@@ -93,7 +93,13 @@ do
                [[ ${stripitbaby} -eq 1 ]] && ${STRIP} -g "${x}"
        elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* || ${f} == *"SB relocatable"* ]] ; then
                vecho "   ${x:${#D}}"
-               [[ ${f} != *"SB relocatable"* ]] && save_elf_debug "${x}"
+               if [[ ${f} != *"SB relocatable"* ]] || [[ ${x} == *.ko ]] ; then
+                       # only split debug info for final linked objects
+                       # or kernel modules as debuginfo for intermediatary
+                       # files (think crt*.o from gcc/glibc) is useless and
+                       # actually causes problems
+                       save_elf_debug "${x}"
+               fi
                [[ -n ${NOSTRIP} ]] && continue
                if [[ ${stripitbaby} -eq 1 ]] ; then
                        [[ ${f} == *"SB relocatable"* ]] \