annotate libbacktrace/filetype.awk @ 150:26042f4007d5 current

fix examples
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 23 May 2020 07:51:47 +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