]> Devi Nivas Git - cs3210-lab1.git/commitdiff
add rule to generate init.sym
authorrsc <rsc>
Wed, 8 Aug 2007 07:43:02 +0000 (07:43 +0000)
committerrsc <rsc>
Wed, 8 Aug 2007 07:43:02 +0000 (07:43 +0000)
Makefile

index fd9d9cdb2e01e63e1270aff81d8481989599a9f0..22bd1e8e31a8b98fdd541502ed5f8fbea87cc6cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -81,6 +81,7 @@ _cat : cat.o $(ULIB)
 _init : init.o $(ULIB)
        $(LD) -N -e main -Ttext 0 -o _init init.o $(ULIB)
        $(OBJDUMP) -S _init > init.asm
+       $(OBJDUMP) -t _init | awk '/SYMBOL TABLE/ { go=1; next } go {print $$1, $$NF}' >init.sym
 
 _sh : sh.o $(ULIB)
        $(LD) -N -e main -Ttext 0 -o _sh sh.o $(ULIB)