File:  [Qemu by Fabrice Bellard] / qemu / roms / vgabios / dataseghack
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:36:45 2018 UTC (8 years, 3 months ago) by root
Branches: qemu, MAIN
CVS tags: qemu1101, qemu1001, qemu1000, qemu0151, qemu0150, qemu0141, qemu0140, qemu0130, qemu0124, qemu0123, qemu0122, qemu0121, qemu0120, HEAD
qemu 0.12.0

#!/bin/bash

awk \
  'BEGIN { }\
  /^\.text/,/DATA_SEG_DEFS_HERE/ { print }\
  END { }'\
  $1 > temp.awk.1

awk \
  'BEGIN { i = 0; last = "hello" }\
  /BLOCK_STRINGS_BEGIN/,/^\.bss/ { if ( i > 1 ) { print last } last = $0; i = i + 1 }\
  END { }'\
  $1 > temp.awk.2

awk \
  'BEGIN { }\
  /DATA_SEG_DEFS_HERE/,/BLOCK_STRINGS_BEGIN/ { print }\
  END { }'\
  $1 > temp.awk.3

cp $1 $1.orig
cat temp.awk.1 temp.awk.2 temp.awk.3 | sed -e 's/^\.data//' -e 's/^\.bss//' -e 's/^\.text//' > $1
/bin/rm -f temp.awk.1 temp.awk.2 temp.awk.3 $1.orig

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.