annotate libbacktrace/filetype.awk @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 # An awk script to determine the type of a file.
kono
parents:
diff changeset
2 /\177ELF\001/ { if (NR == 1) { print "elf32"; exit } }
kono
parents:
diff changeset
3 /\177ELF\002/ { if (NR == 1) { print "elf64"; exit } }
kono
parents:
diff changeset
4 /\114\001/ { if (NR == 1) { print "pecoff"; exit } }
kono
parents:
diff changeset
5 /\144\206/ { if (NR == 1) { print "pecoff"; exit } }
kono
parents:
diff changeset
6 /\001\337/ { if (NR == 1) { print "xcoff32"; exit } }
kono
parents:
diff changeset
7 /\001\367/ { if (NR == 1) { print "xcoff64"; exit } }
kono
parents:
diff changeset
8