Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

ld(1)

a.out(4)

ar(4)

model(4)

MAGIC(4)  —  HP-UX

NAME

magic − magic numbers for HP-UX implementations

SYNOPSIS

#include <magic.h>

DESCRIPTION

Magic.h localizes all information about HP-UX "magic numbers" in one file, and thus facilitates 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 LISP_MAGIC 0x10C /* compiled Lisp */
#define HPE_MAGIC 0x150 /* HPE boot image */

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

WARNINGS

Cpio files use a different form of magic number that is incompatible with magic(4). 

HARDWARE DEPENDENCIES

Series 200, 300, 800
An additional file type is defined:

 #define DEMAND_MAGIC0x10B/* demand-load executable */

SEE ALSO

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

Hewlett-Packard Company  —  Version B.1,  April 12, 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026