discard85: make this work
authorAlan Cox <alan@linux.intel.com>
Tue, 12 Mar 2019 21:59:35 +0000 (21:59 +0000)
committerAlan Cox <alan@linux.intel.com>
Tue, 12 Mar 2019 21:59:35 +0000 (21:59 +0000)
Kernel/tools/discard85

index d2d2046..ae1a133 100755 (executable)
@@ -1,8 +1,13 @@
 #!/bin/sh
 #
 #      ACK thinks we are the assembler. We will play with the incoming
-#      stream to move .text and .rom to .discard and feed it to the assembler
+#      stream to move .text to .discard and feed it to the assembler
 #
+#      TODO: if it is worth it add another section for discard data
+#
+#      Called with - -o dest src
+#
+echo $3 $4 >/dev/tty
 ACK_ROOT=$(which ack | sed -e "s/\/bin\/ack//")
 X=$(mktemp)
 (echo ".sect .text"
@@ -11,6 +16,6 @@ X=$(mktemp)
  echo ".sect .bss"
  echo ".sect .common"
  echo ".sect .discard") >$X
-sed -e "s/\.text/\.discard/" | sed -e "s/\.rom/\.discard/" | cat $X - |        
-       $ACK_ROOT/lib/ack/cpm/as
+cat $4 | sed -e "s/\.text/\.discard/" >> $X
+$ACK_ROOT/lib/ack/cpm/as $1 -o $3 $X
 rm $X