Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 787623 | Differences between
and this patch

Collapse All | Expand All

(-)a/bin/estrip (-7 / +12 lines)
Lines 280-288 dedup_elf_debug() { Link Here
280
280
281
# Usage: save_elf_debug <src> <inode_debug> [splitdebug]
281
# Usage: save_elf_debug <src> <inode_debug> [splitdebug]
282
save_elf_debug() {
282
save_elf_debug() {
283
	${FEATURES_splitdebug} || return 0
284
	${PORTAGE_RESTRICT_splitdebug} && return 0
285
286
	debug-print-function "${FUNCNAME}" "$@"
283
	debug-print-function "${FUNCNAME}" "$@"
287
284
288
	# NOTE: Debug files must be installed in
285
	# NOTE: Debug files must be installed in
Lines 390-396 process_elf() { Link Here
390
387
391
	if ${strip_this} ; then
388
	if ${strip_this} ; then
392
		# See if we can split & strip at the same time
389
		# See if we can split & strip at the same time
393
		if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
390
		if ${splitdebug} && [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
394
			local shortname="${x##*/}.debug"
391
			local shortname="${x##*/}.debug"
395
			local splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID:-$(__bashpid)}"
392
			local splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID:-$(__bashpid)}"
396
393
Lines 401-407 process_elf() { Link Here
401
				"${x}"
398
				"${x}"
402
			save_elf_debug "${x}" "${inode_link}_debug" "${splitdebug}"
399
			save_elf_debug "${x}" "${inode_link}_debug" "${splitdebug}"
403
		else
400
		else
404
			save_elf_debug "${x}" "${inode_link}_debug"
401
			if ${splitdebug} ; then
402
				save_elf_debug "${x}" "${inode_link}_debug"
403
			fi
405
			${already_stripped} || ${STRIP} ${strip_flags} "${x}"
404
			${already_stripped} || ${STRIP} ${strip_flags} "${x}"
406
		fi
405
		fi
407
	fi
406
	fi
Lines 431-437 process_ar() { Link Here
431
		# There is no concept of splitdebug for objects not yet
430
		# There is no concept of splitdebug for objects not yet
432
		# linked in (only for finally linked ELFs), so we have to
431
		# linked in (only for finally linked ELFs), so we have to
433
		# retain the debug info in the archive itself.
432
		# retain the debug info in the archive itself.
434
		if ! ${FEATURES_splitdebug} || ${PORTAGE_RESTRICT_splitdebug} ; then
433
		if ! ${splitdebug} ; then
435
			${STRIP} -g "${x}" && ${RANLIB} "${x}"
434
			${STRIP} -g "${x}" && ${RANLIB} "${x}"
436
		fi
435
		fi
437
	fi
436
	fi
Lines 542-547 do Link Here
542
		set +o noglob
541
		set +o noglob
543
	fi
542
	fi
544
543
544
	if ${FEATURES_splitdebug} && ! ${PORTAGE_RESTRICT_splitdebug} ; then
545
		splitdebug=true
546
	else
547
		splitdebug=false
548
	fi
549
545
	# In Prefix we are usually an unprivileged user, so we can't strip
550
	# In Prefix we are usually an unprivileged user, so we can't strip
546
	# unwritable objects.  Make them temporarily writable for the
551
	# unwritable objects.  Make them temporarily writable for the
547
	# stripping.
552
	# stripping.
Lines 564-569 do Link Here
564
		${f} == *"SB shared object"* ]] ; then
569
		${f} == *"SB shared object"* ]] ; then
565
		process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS}
570
		process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS}
566
	elif [[ ${f} == *"SB relocatable"* ]] ; then
571
	elif [[ ${f} == *"SB relocatable"* ]] ; then
572
		[[ ${x} == *.ko ]] || splitdebug=false
567
		process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS}
573
		process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS}
568
	fi
574
	fi
569
575
570
- 

Return to bug 787623