8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sgs / link_audit / common / symbindrep.ksh
blob8dd560723a1e2bfa8f5ad6a2dedce07b59587033
1 #!/bin/ksh
3 # CDDL HEADER START
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
20 # CDDL HEADER END
22 # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
24 usage() {
25 echo "usage: symbindrep -[$optlet] utility"
26 echo " -f <bindfromlist>"
27 echo " A colon sperated list of libraries that will have"
28 echo " symbol references tracked. Only symbol references"
29 echo " originating from these libraries will be tracked."
30 echo " The default is to track symbol references from"
31 echo " all libraries."
32 echo " -t <bindtolist>"
33 echo " A colon separated list of libraries to track"
34 echo " symbol bindings. Only bindings to objects in"
35 echo " these objects will be tracked. The default is to"
36 echo " track bindings to all objects."
37 echo " -l <bindreplib>"
38 echo " specify an alternate symbindrep.so to use."
41 bindto=""
42 bindfrom=""
43 symbindreplib32="/opt/SUNWonld/lib/32/symbindrep.so.1"
44 symbindreplib64="/opt/SUNWonld/lib/64/symbindrep.so.1"
46 optlet="f:t:l:"
48 while getopts $optlet c
50 case $c in
52 bindfrom="$OPTARG"
55 bindto="$OPTARG"
58 symbindreplib32="$OPTARG"
59 symbindreplib64="$OPTARG"
61 \?)
62 usage
63 exit 1
65 esac
66 done
67 shift `expr $OPTIND - 1`
70 # Build environment variables
73 SYMBINDREP_BINDTO="$bindto" \
74 SYMBINDREP_BINDFROM="$bindfrom" \
75 LD_BIND_NOW=1 \
76 LD_AUDIT_32="$symbindreplib32" \
77 LD_AUDIT_64="$symbindreplib64" \
80 exit 0