[BACK]Return to makelst CVS log [TXT][DIR] Up to [Development] / linux-2.4-xfs-OLD / linux / scripts

File: [Development] / linux-2.4-xfs-OLD / linux / scripts / makelst (download)

Revision 1.2, Thu Feb 22 21:09:04 2001 UTC (16 years, 8 months ago) by lord
Branch: MAIN
CVS Tags: XFS-1_3_0pre1, Release-1_0_0, PreRelease-0_10, Linux-2_4_5-merge, HEAD
Changes since 1.1: +3 -2 lines

merge upto 2.4.2

#!/bin/bash
# A script to dump mixed source code & assembly
# with correct relocations from System.map
# Requires the following lines in Rules.make.
# Author(s): DJ Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) 
#            William Stearns <wstearns@pobox.com>
#%.lst: %.c
#	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -g -c -o $*.o $<
#	$(TOPDIR)/scripts/makelst $* $(TOPDIR) $(OBJDUMP)
#
#    Copyright (C) 2000 IBM Corporation
#    Author(s): DJ Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) 
#

t1=`$3 --syms $2/$1.o | grep .text | grep " F " | head -n 1`
t2=`echo $t1 | gawk '{ print $6 }'`
t3=`grep $t2 $2/System.map`
t4=`echo $t3 | gawk '{ print $1 }'`
t5=`echo $t1 | gawk '{ print $1 }'`
t6=`echo $t4 - $t5 | sed -e s/a/A/g -e s/b/B/g -e s/c/C/g -e s/d/D/g -e s/e/E/g -e s/f/F/g`
t7=`( echo  ibase=16 ; echo $t6 ) | bc`
$3 --source --adjust-vma=$t7 $2/$1.o > $2/$1.lst