HPUX magic[4]






 magic(4)                                                           magic(4)





 NAME
      magic - magic numbers for HP-UX implementations

 SYNOPSIS
      #include <magic.h>

 DESCRIPTION
      The magic.h file localizes all information about HP-UX ``magic
      numbers'' in one file, thus facilitating uniform treatment of magic
      numbers.  This file specifies the location of the magic number in a
      file (always the start of the file) and the structure of the magic
      number:

           struct magic_number {
               unsigned short    system_id;
               unsigned short    file_type;
           };
           typedef      struct    magic_number MAGIC;

      magic.h includes definitions for the system IDs of all HP machines
      running HP-UX, and file types that are common to all implementations.
      There may be additional implementation-dependent file types.  The
      predefined file types are:

           /* for object code files */
               #define RELOC_MAGIC     0x106   /* relocatable only */
               #define EXEC_MAGIC      0x107   /* normal executable */
               #define SHARE_MAGIC     0x108   /* shared executable */
               #define DEMAND_MAGIC    0x10B   /* demand-load executable */
               #define LISP_MAGIC      0x10C   /* compiled Lisp */
               #define DL_MAGIC        0x10D   /* dynamic load library */
               #define SHL_MAGIC       0x10E   /* shared library */
               #define HPE_MAGIC       0x150   /* HPE boot image */

      The values for system_id are defined in model(4).

 WARNINGS
      Files managed by cpio use a different form of magic number that is
      incompatible with <magic.h>.

 SEE ALSO
      ar(1), ld(1), a.out(4), ar(4), model(4).












 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992