apparmor/utils/binary_preprocess

56 lines
1.4 KiB
Text
Raw Normal View History

#!/bin/sh
#****************************************************************************
#* Copyright (c) Andrew Gross 2003-2004
#* All Rights Reserved
#*
#* The following information and material is confidential and proprietary
#* information of Andrew Gross (the "Confidential Material") and
#* is protected by copyright, patent, trade secrets and other intellectual
#* and property laws. Access to this Confidential Material is limited to
#* authorized employees and/or licensees. Any unauthorized use of the
#* Confidential Material could subject the user to criminal and/or civil
#* penalties.
#*
#* This work is intended for Immunix, Inc. (the "Client") on a
#* work-for-hire basis pending contract completion and payment whereupon
#* all rights confer to the Client.
#*
#****************************************************************************
# Usage: ./pass1 path_to_executable
# Get basename of path given on command line.
#
FILE=`basename $1`
# Clear out old data
#
/bin/rm -rf $FILE
mkdir -p $FILE
# Run objdump with a variety of options to obtain data files for pass2
#
objdump $1 -x > $FILE/header
objdump $1 -R > $FILE/dynam
objdump $1 -d > $FILE/text
objdump $1 -T > $FILE/dyn_syms
objdump $1 -s --section=.rodata > $FILE/rodata
objdump $1 -s --section=.data > $FILE/data
# Used only for object files
#
objdump $1 -r > $FILE/reloc
# Not used
#
#objdump $1 -t > $FILE/syms