Print this page
8858 /usr/bin/grep doesn't support -E option
4580 /usr/bin/grep can't handle multibyte characters
8929 8868 tests are not delivered with system/test/utiltest
8860 Example in grep(1) is incorrect
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/elfcmp.sh
          +++ new/usr/src/tools/scripts/elfcmp.sh
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17  # If applicable, add the following below this CDDL HEADER, with the
  18   18  # fields enclosed by brackets "[]" replaced with your own identifying
  19   19  # information: Portions Copyright [yyyy] [name of copyright owner]
  20   20  #
  21   21  # CDDL HEADER END
  22   22  #
  23   23  #
  24   24  # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  25   25  # Use is subject to license terms.
  26   26  # 
  27      -#ident  "%Z%%M% %I%     %E% SMI"
  28      -#
  29   27  # elfcmp - compare significant sections in two ELF files
  30   28  #
  31   29  # usage: elfcmp [-v] [-S] [-s section ...] <f1> <f2>
  32   30  #
  33   31  
  34   32  VERBOSE=0
  35   33  SECTIONLIST=""
  36   34  SIGNING_CHECK=0
  37   35  ERRORS=0
  38   36  
↓ open down ↓ 36 lines elided ↑ open up ↑
  75   73  
  76   74  list_sections() {
  77   75          dump -h "$1" | grep '\[[0-9]' | awk '{print $7}'
  78   76  }
  79   77  
  80   78  list_alloc_sections() {
  81   79          dump -hv "$1" | grep '\[[0-9]' | awk '$3 ~ /A/ {print $4, $5, $6, $7}'
  82   80  }
  83   81  
  84   82  signing_filter() {
  85      -        /usr/xpg4/bin/grep -v -e \\$SHSTRTAB -e \\.SUNW_signature
       83 +        /usr/bin/grep -v -e \\$SHSTRTAB -e \\.SUNW_signature
  86   84  }
  87   85          
  88   86  # get section lists for both files into temp files
  89   87  
  90   88  if [[ "$SECTIONLIST" = "" ]]
  91   89  then
  92   90          if [[ $SIGNING_CHECK = 1 ]]
  93   91          then
  94   92                  SHSTRNDX=`dump -f "$1" | awk '{if (NR==11) print $5}'`
  95   93                  SHSTRTAB=`dump -h "$1" | grep "^\\[$SHSTRNDX\\]" | \
↓ open down ↓ 80 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX