mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

check_dynamic (567B)


      1 check_dynamic() {
      2 	local exe || true
      3 	exe=$pthbs_destdir'{{versions}}'/$pthbs_package/$1
      4 	if ! test -f $exe; then
      5 		printf '%s\n' "Error: file '$1' doesn't exist!"
      6 		exit 1
      7 	fi
      8 	local interp_info || true
      9 	interp_info=$(readelf --string-dump=.interp "$exe") || exit $?
     10 	case $interp_info in
     11 		('')
     12 			printf '%s\n' "Error: '$1' is not a dynamic binary!"
     13 			exit 1
     14 			;;
     15 		(*'{{pkg_install_dir("musl-cross-make")}}/{{triplet}}/lib/ld-musl-{{triplet.split('-')[0]}}.so.1')
     16 			return 0
     17 			;;
     18 		(*)
     19 			printf '%s\n' "Error: '$1' unexpected linker path!"
     20 			exit 1
     21 	esac
     22 }