[BACK]Return to ctfstrip CVS log [TXT][DIR] Up to [local] / src / usr.bin / ctfconv

Diff for /src/usr.bin/ctfconv/ctfstrip between version 1.7 and 1.8

version 1.7, 2017/08/14 20:09:17 version 1.8, 2017/08/15 15:48:10
Line 39 
Line 39 
         -S)     STRIPFLAG=-g; shift; continue;;          -S)     STRIPFLAG=-g; shift; continue;;
         esac          esac
         shift          shift
         set -- "$@" "$INFILE"          set -- "$@" "$arg"
         INFILE="$arg"          INFILE="$arg"
 done  done
   
Line 53 
Line 53 
   
 # Extract kernel version  # Extract kernel version
 if [ -z "${INFILE##bsd*}" ]; then  if [ -z "${INFILE##bsd*}" ]; then
         LABEL=`what $INFILE | sed -n '$s/^   //p'`          LABEL=`what "$INFILE" | sed -n '$s/^   //p'`
 fi  fi
   
 # If ctfstrip was passed a file that lacks useful debug sections, ctfconv will fail.  # If ctfstrip was passed a file that lacks useful debug sections, ctfconv will fail.
 # So try to run ctfconv and silently fallback to plain strip(1) if that failed.  # So try to run ctfconv and silently fallback to plain strip(1) if that failed.
 ctfconv -o ${TMPFILE} -l "${LABEL}" ${INFILE} 2> /dev/null  ctfconv -o ${TMPFILE} -l "${LABEL}" "${INFILE}" 2> /dev/null
   
 if [ $? -eq 0 ]; then  if [ $? -eq 0 ]; then
         objcopy --add-section .SUNW_ctf=${TMPFILE} ${STRIPFLAG} ${INFILE} ${OUTFILE}          objcopy --add-section .SUNW_ctf=${TMPFILE} ${STRIPFLAG} "${INFILE}" "${OUTFILE}"
 else  else
         strip ${STRIPFLAG} $@ -o ${OUTFILE} ${INFILE}          strip ${STRIPFLAG} -o "${OUTFILE}" "$@"
 fi  fi
   
 rm -f ${TMPFILE}  rm -f ${TMPFILE}

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8