summaryrefslogtreecommitdiffstats
path: root/usr.bin/file/Magdir
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1997-03-18 19:37:41 +0000
committermpp <mpp@FreeBSD.org>1997-03-18 19:37:41 +0000
commitc80207ab497d53f6b4e875029804295bbed9cb56 (patch)
tree8d23040c7ea9ff0f9d863cc3a1849433228224f2 /usr.bin/file/Magdir
parentb15d6bfc2978bb74d2f16e720b496d73d2da89f2 (diff)
downloadFreeBSD-src-c80207ab497d53f6b4e875029804295bbed9cb56.zip
FreeBSD-src-c80207ab497d53f6b4e875029804295bbed9cb56.tar.gz
Merge to resolve conflicts with file 3.22 merge.
Diffstat (limited to 'usr.bin/file/Magdir')
-rw-r--r--usr.bin/file/Magdir/audio29
-rw-r--r--usr.bin/file/Magdir/elf31
-rw-r--r--usr.bin/file/Magdir/freebsd127
-rw-r--r--usr.bin/file/Magdir/java7
-rw-r--r--usr.bin/file/Magdir/pgp1
5 files changed, 135 insertions, 60 deletions
diff --git a/usr.bin/file/Magdir/audio b/usr.bin/file/Magdir/audio
index 709a29e..5433557 100644
--- a/usr.bin/file/Magdir/audio
+++ b/usr.bin/file/Magdir/audio
@@ -16,6 +16,10 @@
>12 belong 6 32-bit IEEE floating point,
>12 belong 7 64-bit IEEE floating point,
>12 belong 23 8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
+>12 belong 24 compressed (8-bit G.722 ADPCM)
+>12 belong 25 compressed (3-bit G.723 ADPCM),
+>12 belong 26 compressed (5-bit G.723 ADPCM),
+>12 belong 27 8-bit A-law,
>20 belong 1 mono,
>20 belong 2 stereo,
>20 belong 4 quad,
@@ -54,14 +58,15 @@
>4 belong x - version %ld
# Microsoft WAVE format (*.wav)
-# [GRR 950115: probably all of the shorts and longs should be leshort/lelong]
0 string RIFF Microsoft RIFF
>8 string WAVE \b, WAVE audio data
->34 short >0 \b, %d bit
->22 short =1 \b, mono
->22 short =2 \b, stereo
->22 short >2 \b, %d channels
->24 long >0 %d Hz
+>>34 leshort >0 \b, %d bit
+>>22 leshort =1 \b, mono
+>>22 leshort =2 \b, stereo
+>>22 leshort >2 \b, %d channels
+>>24 lelong >0 %d Hz
+# AVI == Audio Video Interleave
+>8 string AVI\ \b, AVI data
# Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
# [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
@@ -72,6 +77,18 @@
>83 byte 0 (module)
>83 byte 1 (song)
+# Real Audio (Magic .ra\0375)
+0 belong 0x2e7261fd realaudio sound file
+
+# MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
+# Oct 31, 1995
+0 string MTM MultiTracker Module sound file
+0 string if Composer 669 Module sound data
+0 string FAR Module sound data
+0 string MAS_U ULT(imate) Module sound data
+0x2c string SCRM ScreamTracker III Module sound data
+0 string Extended Module Extended Module sound data
+
# Gravis UltraSound patches
# From <ache@nagual.ru>
diff --git a/usr.bin/file/Magdir/elf b/usr.bin/file/Magdir/elf
index 5ecd1c2..58f4f36 100644
--- a/usr.bin/file/Magdir/elf
+++ b/usr.bin/file/Magdir/elf
@@ -5,8 +5,8 @@
# We have to check the byte order flag to see what byte order all the
# other stuff in the header is in.
#
-# Byte order is probably big-endian for MIPS RS3000 and Amdahl.
# MIPS RS3000 may also be for MIPS RS2000.
+# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
#
# updated by Daniel Quinlan (quinlan@yggdrasil.com)
0 string \177ELF ELF
@@ -19,7 +19,9 @@
>>16 leshort 1 relocatable,
>>16 leshort 2 executable,
>>16 leshort 3 shared object,
->>16 leshort 4 core file,
+# Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
+>>16 leshort 4 core file
+>>>400 lelong >0 (signal %d),
>>16 leshort &0xff00 processor-specific,
>>18 leshort 0 no machine,
>>18 leshort 1 AT&T WE32100 - invalid byte order,
@@ -29,8 +31,16 @@
>>18 leshort 5 Motorola 88000 - invalid byte order,
>>18 leshort 6 Intel 80486,
>>18 leshort 7 Intel 80860,
->>18 leshort 8 MIPS RS3000,
->>18 leshort 9 Amdahl,
+>>18 leshort 8 MIPS RS3000_BE - invalid byte order,
+>>18 leshort 9 Amdahl - invalid byte order,
+>>18 leshort 10 MIPS RS3000_LE,
+>>18 leshort 11 RS6000 - invalid byte order,
+>>18 leshort 15 PA_RISC - invalid byte order,
+>>18 leshort 16 nCUBE,
+>>18 leshort 17 VPP500,
+>>18 leshort 18 SPARC32PLUS,
+>>18 leshort 20 PowerPC,
+>>18 leshort 0x9026 Alpha,
>>20 lelong 0 invalid version
>>20 lelong 1 version 1
>>36 lelong 1 MathCoPro/FPU/MAU Required
@@ -40,6 +50,7 @@
>>16 beshort 2 executable,
>>16 beshort 3 shared object,
>>16 beshort 4 core file,
+>>>400 lelong >0 (signal %d),
>>16 beshort &0xff00 processor-specific,
>>18 beshort 0 no machine,
>>18 beshort 1 AT&T WE32100,
@@ -49,8 +60,16 @@
>>18 beshort 5 Motorola 88000,
>>18 beshort 6 Intel 80486 - invalid byte order,
>>18 beshort 7 Intel 80860,
->>18 beshort 8 MIPS RS3000,
->>18 leshort 9 Amdahl,
+>>18 beshort 8 MIPS RS3000_BE,
+>>18 beshort 9 Amdahl,
+>>18 beshort 10 MIPS RS3000_LE - invalid byte order,
+>>18 beshort 11 RS6000,
+>>18 beshort 15 PA_RISC,
+>>18 beshort 16 nCUBE,
+>>18 beshort 17 VPP500,
+>>18 beshort 18 SPARC32PLUS,
+>>18 beshort 20 PowerPC,
+>>18 beshort 0x9026 Alpha,
>>20 belong 0 invalid version
>>20 belong 1 version 1
>>36 belong 1 MathCoPro/FPU/MAU Required
diff --git a/usr.bin/file/Magdir/freebsd b/usr.bin/file/Magdir/freebsd
index 5ab8586..2370c25 100644
--- a/usr.bin/file/Magdir/freebsd
+++ b/usr.bin/file/Magdir/freebsd
@@ -1,6 +1,79 @@
-# the following are for BSD/i386 (FreeBSD, NetBSD, etc.)
-0 lelong&0377777777 041400407 BSD/i386
+#------------------------------------------------------------------------------
+# freebsd: file(1) magic for FreeBSD objects
+#
+# All new-style FreeBSD magic numbers are in host byte order (i.e.,
+# little-endian on x86).
+#
+# XXX - this comes from the file "freebsd" in a recent FreeBSD version of
+# "file"; it, and the NetBSD stuff in "netbsd", appear to use different
+# schemes for distinguishing between executable images, shared libraries,
+# and object files.
+#
+# FreeBSD says:
+#
+# Regardless of whether it's pure, demand-paged, or none of the
+# above:
+#
+# if the entry point is < 4096, then it's a shared library if
+# the "has run-time loader information" bit is set, and is
+# position-independent if the "is position-independent" bit
+# is set;
+#
+# if the entry point is >= 4096 (or >4095, same thing), then it's
+# an executable, and is dynamically-linked if the "has run-time
+# loader information" bit is set.
+#
+# On x86, NetBSD says:
+#
+# If it's neither pure nor demand-paged:
+#
+# if it has the "has run-time loader information" bit set, it's
+# a dynamically-linked executable;
+#
+# if it doesn't have that bit set, then:
+#
+# if it has the "is position-independent" bit set, it's
+# position-independent;
+#
+# if the entry point is non-zero, it's an executable, otherwise
+# it's an object file.
+#
+# If it's pure:
+#
+# if it has the "has run-time loader information" bit set, it's
+# a dynamically-linked executable, otherwise it's just an
+# executable.
+#
+# If it's demand-paged:
+#
+# if it has the "has run-time loader information" bit set,
+# then:
+#
+# if the entry point is < 4096, it's a shared library;
+#
+# if the entry point is = 4096 or > 4096 (i.e., >= 4096),
+# it's a dynamically-linked executable);
+#
+# if it doesn't have the "has run-time loader information" bit
+# set, then it's just an executable.
+#
+# (On non-x86, NetBSD does much the same thing, except that it uses
+# 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
+# pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
+# had 8K pages; dunno about MIPS.)
+#
+# I suspect the two will differ only in perverse and uninteresting cases
+# ("shared" libraries that aren't demand-paged and whose pages probably
+# won't actually be shared, executables with entry points <4096).
+#
+# I leave it to those more familiar with FreeBSD and NetBSD to figure out
+# what the right answer is (although using ">4095", FreeBSD-style, is
+# probably better than separately checking for "=4096" and ">4096",
+# NetBSD-style). (The old "netbsd" file analyzed FreeBSD demand paged
+# executables using the NetBSD technique.)
+#
+0 lelong&0377777777 041400407 FreeBSD/i386
>20 lelong <4096
>>3 byte&0xC0 &0x80 shared library
>>3 byte&0xC0 0x40 PIC object
@@ -10,7 +83,7 @@
>>3 byte&0x80 0x00 executable
>16 lelong >0 not stripped
-0 lelong&0377777777 041400410 BSD/i386 pure
+0 lelong&0377777777 041400410 FreeBSD/i386 pure
>20 lelong <4096
>>3 byte&0xC0 &0x80 shared library
>>3 byte&0xC0 0x40 PIC object
@@ -20,7 +93,7 @@
>>3 byte&0x80 0x00 executable
>16 lelong >0 not stripped
-0 lelong&0377777777 041400413 BSD/i386 demand paged
+0 lelong&0377777777 041400413 FreeBSD/i386 demand paged
>20 lelong <4096
>>3 byte&0xC0 &0x80 shared library
>>3 byte&0xC0 0x40 PIC object
@@ -30,7 +103,7 @@
>>3 byte&0x80 0x00 executable
>16 lelong >0 not stripped
-0 lelong&0377777777 041400314 BSD/i386 compact demand paged
+0 lelong&0377777777 041400314 FreeBSD/i386 compact demand paged
>20 lelong <4096
>>3 byte&0xC0 &0x80 shared library
>>3 byte&0xC0 0x40 PIC object
@@ -40,46 +113,6 @@
>>3 byte&0x80 0x00 executable
>16 lelong >0 not stripped
-0 belong&0377777777 041400407 BSD/i386
->20 belong <4096
->>0 byte&0xC0 &0x80 shared library
->>0 byte&0xC0 0x40 PIC object
->>0 byte&0xC0 0x00 object
->20 belong >4095
->>0 byte&0x80 0x80 dynamically linked executable
->>0 byte&0x80 0x00 executable
->16 belong >0 not stripped
-
-0 belong&0377777777 041400410 BSD/i386 pure
->20 belong <4096
->>0 byte&0xC0 &0x80 shared library
->>0 byte&0xC0 0x40 PIC object
->>0 byte&0xC0 0x00 object
->20 belong >4095
->>0 byte&0x80 0x80 dynamically linked executable
->>0 byte&0x80 0x00 executable
->16 belong >0 not stripped
-
-0 belong&0377777777 041400413 BSD/i386 demand paged
->20 belong <4096
->>0 byte&0xC0 &0x80 shared library
->>0 byte&0xC0 0x40 PIC object
->>0 byte&0xC0 0x00 object
->20 belong >4095
->>0 byte&0x80 0x80 dynamically linked executable
->>0 byte&0x80 0x00 executable
->16 belong >0 not stripped
-
-0 belong&0377777777 041400314 BSD/i386 compact demand paged
->20 belong <4096
->>0 byte&0xC0 &0x80 shared library
->>0 byte&0xC0 0x40 PIC object
->>0 byte&0xC0 0x00 object
->20 belong >4095
->>0 byte&0x80 0x80 dynamically linked executable
->>0 byte&0x80 0x00 executable
->16 belong >0 not stripped
-
# XXX gross hack to identify core files
# cores start with a struct tss; we take advantage of the following:
# byte 7: highest byte of the kernel stack pointer, always 0xfe
@@ -88,8 +121,8 @@
# 28: low order byte of the current PTD entry, always 0 since the
# PTD is page-aligned
#
-7 string \357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 i386 a.out core file
->1039 string >\0 from "%s"
+7 string \357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 FreeBSD/i386 a.out core file
+>1039 string >\0 from '%s'
# /var/run/ld.so.hints
# What are you laughing about?
diff --git a/usr.bin/file/Magdir/java b/usr.bin/file/Magdir/java
index c717f88..219f93e 100644
--- a/usr.bin/file/Magdir/java
+++ b/usr.bin/file/Magdir/java
@@ -1,4 +1,9 @@
-#------------------------------------------------------------------------------
+#------------------------------------------------------------
+# Java ByteCode
+# From Larry Schwimmer (schwim@cs.stanford.edu)
+0 belong 0xcafebabe
+>4 belong 0x0003002d Java bytecode
+#
# java: file(1) magic for java compiled classes
#
diff --git a/usr.bin/file/Magdir/pgp b/usr.bin/file/Magdir/pgp
index aaff0e9..038d098 100644
--- a/usr.bin/file/Magdir/pgp
+++ b/usr.bin/file/Magdir/pgp
@@ -5,6 +5,7 @@
0 beshort 0x9900 PGP key public ring
0 beshort 0x9501 PGP key security ring
0 beshort 0x9500 PGP key security ring
+0 beshort 0xa600 PGP encrypted data
0 string -----BEGIN\040PGP PGP armored data
>15 string PUBLIC\040KEY\040BLOCK- public key block
>15 string MESSAGE- message
OpenPOWER on IntegriCloud