diff --git a/wrap-find-debuginfo.sh b/wrap-find-debuginfo.sh index 42b3609..d26f8eb 100644 --- a/wrap-find-debuginfo.sh +++ b/wrap-find-debuginfo.sh @@ -136,9 +136,10 @@ done debug_base_name=${last_arg:-$RPM_BUILD_ROOT} $debugedit -b "$debug_base_name" -d "$debug_dest_name" -n $ldso_path # Remove the .annobin* symbols (and only them). -nm --format=just-symbols "$ldso_path" \ - | grep '^\.annobin' > "$ldso_tmp.annobin-symbols" -objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path" +if nm --format=just-symbols "$ldso_path" \ + | grep '^\.annobin' > "$ldso_tmp.annobin-symbols"; then + objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path" +fi # Apply single-file DWARF optimization. dwz $ldso_path