···19 if ! isELF "$i"; then continue; fi
2021 # Extract the Build ID. FIXME: there's probably a cleaner way.
22- local id="$(readelf -n "$i" | sed 's/.*Build ID: \([0-9a-f]*\).*/\1/; t; d')"
23 if [ "${#id}" != 40 ]; then
24 echo "could not find build ID of $i, skipping" >&2
25 continue
···28 # Extract the debug info.
29 header "separating debug info from $i (build ID $id)"
30 mkdir -p "$dst/${id:0:2}"
31- objcopy --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug"
32- strip --strip-debug "$i"
3334 # Also a create a symlink <original-name>.debug.
35 ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
···19 if ! isELF "$i"; then continue; fi
2021 # Extract the Build ID. FIXME: there's probably a cleaner way.
22+ local id="$($READELF -n "$i" | sed 's/.*Build ID: \([0-9a-f]*\).*/\1/; t; d')"
23 if [ "${#id}" != 40 ]; then
24 echo "could not find build ID of $i, skipping" >&2
25 continue
···28 # Extract the debug info.
29 header "separating debug info from $i (build ID $id)"
30 mkdir -p "$dst/${id:0:2}"
31+ $OBJCOPY --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug"
32+ $STRIP --strip-debug "$i"
3334 # Also a create a symlink <original-name>.debug.
35 ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
+1-1
pkgs/build-support/setup-hooks/strip.sh
···3031 if [ -n "${dirs}" ]; then
32 header "stripping (with flags $stripFlags) in$dirs"
33- find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} strip $commonStripFlags $stripFlags 2>/dev/null || true
34 stopNest
35 fi
36}
···3031 if [ -n "${dirs}" ]; then
32 header "stripping (with flags $stripFlags) in$dirs"
33+ find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} $STRIP $commonStripFlags $stripFlags 2>/dev/null || true
34 stopNest
35 fi
36}
+1-1
pkgs/build-support/setup-hooks/win-dll-link.sh
···25 linkCount=0
26 # Iterate over any DLL that we depend on.
27 local dll
28- for dll in $(objdump -p *.{exe,dll} | sed -n 's/.*DLL Name: \(.*\)/\1/p' | sort -u); do
29 if [ -e "./$dll" ]; then continue; fi
30 # Locate the DLL - it should be an *executable* file on $DLLPATH.
31 local dllPath="$(PATH="$DLLPATH" type -P "$dll")"
···25 linkCount=0
26 # Iterate over any DLL that we depend on.
27 local dll
28+ for dll in $($OBJDUMP -p *.{exe,dll} | sed -n 's/.*DLL Name: \(.*\)/\1/p' | sort -u); do
29 if [ -e "./$dll" ]; then continue; fi
30 # Locate the DLL - it should be an *executable* file on $DLLPATH.
31 local dllPath="$(PATH="$DLLPATH" type -P "$dll")"