[BACK]Return to check_sym CVS log [TXT][DIR] Up to [local] / src / lib

Diff for /src/lib/check_sym between version 1.3 and 1.4

version 1.3, 2016/09/22 21:35:25 version 1.4, 2016/09/22 21:37:02
Line 99 
Line 99 
         [[ $old != "" ]]          [[ $old != "" ]]
 }  }
   
 cpu=$(uname -p)  file_list=/tmp/{D{,S,W},J,S,U,d,j,r,s}{1,2}
 if [[ $cpu = mips64* ]]  
 then  
         file_list=/tmp/{D{,S,W,Y},J,S,U,d,j,r,s}{1,2}  
 else  
         file_list=/tmp/{D{,S,W},J,S,U,d,j,r,s}{1,2}  
 fi  
   
 if [[ $1 = "-h" ]]  if [[ $1 = "-h" ]]
 then  then
Line 191 
Line 185 
 readelf -sW $new | filt_symtab > /tmp/s2  readelf -sW $new | filt_symtab > /tmp/s2
   
   
   cpu=$(uname -p)
 if [[ $cpu = mips64* ]]  if [[ $cpu = mips64* ]]
 then  then
         readelf -d $old >/tmp/DY1          gotsym1=$(readelf -d $old | awk '$2 ~ /MIPS_GOTSYM/{print $3}')
         readelf -d $new >/tmp/DY2          gotsym2=$(readelf -d $new | awk '$2 ~ /MIPS_GOTSYM/{print $3}')
 else  
         rm -f /tmp/DY[12]  
 fi  fi
   
 jump_slots() {  jump_slots() {
         case $cpu in          case $cpu in
         hppa*)  awk '/IPLT/ && $5 != ""{print $5}' /tmp/r$1          hppa*)  awk '/IPLT/ && $5 != ""{print $5}' /tmp/r$1
                 ;;                  ;;
         mips*)  gotsym=$(awk '$2 ~ /MIPS_GOTSYM/{print $3}' /tmp/DY$1)          mips*)  # the $((gotsym$1)) converts hex to decimal
                 # the $(($foo)) is to convert hex to decimal                  awk -v g=$((gotsym$1)) \
                 awk -v g=$(($gotsym)) \  
                         '/^Symbol table ..symtab/{exit}                          '/^Symbol table ..symtab/{exit}
                         $1+0 >= g && $4 == "FUNC" {print $8}' /tmp/s$1                          $1+0 >= g && $4 == "FUNC" {print $8}' /tmp/s$1
                 ;;                  ;;
Line 215 
Line 207 
 }  }
   
 dynamic_sym() {  dynamic_sym() {
         # truncate the output files, to guarantee they exist  
         >/tmp/U$1 >/tmp/DS$1 >/tmp/DW$1 >/tmp/D$1  
         awk -v s=$1 '/^Symbol table ..symtab/{exit}          awk -v s=$1 '/^Symbol table ..symtab/{exit}
                 ! /^ *[1-9]/   {next}                  ! /^ *[1-9]/   {next}
                 $7 == "UND"    {print $8 | ("sort -o /tmp/U" s); next }                  $7 == "UND"    {print $8 | ("sort -o /tmp/U" s); next }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4