struct hp300hpux_exec_bytes
{
unsigned char e_info[4];
unsigned char e_spare1[4];
unsigned char e_spare2[4];
unsigned char e_text[4];
unsigned char e_data[4];
unsigned char e_bss[4];
unsigned char e_trsize[4];
unsigned char e_drsize[4];
unsigned char e_passize[4];
unsigned char e_syms[4];
unsigned char e_spare5[4];
unsigned char e_entry[4];
unsigned char e_spare6[4];
unsigned char e_supsize[4];
unsigned char e_drelocs[4];
unsigned char e_extension[4];
};
#define EXEC_BYTES_SIZE 64
struct hp300hpux_nlist_bytes
{
unsigned char e_value[4];
unsigned char e_type[1];
unsigned char e_length[1];
unsigned char e_almod[2];
unsigned char e_shlib[2];
};
#define EXTERNAL_NLIST_SIZE 10
struct hp300hpux_reloc
{
unsigned char r_address[4];
unsigned char r_index[2];
unsigned char r_type[1];
unsigned char r_length[1];
};
struct hp300hpux_header_extension
{
unsigned char e_syms[4];
unsigned char unique_headers[12*4];
unsigned char e_header[2];
unsigned char e_version[2];
unsigned char e_size[4];
unsigned char e_extension[4];
};
#define EXTERNAL_EXTENSION_HEADER_SIZE (16*4)
#define HPUX_DOT_O_MAGIC 0x106
#define OMAGIC 0x107
#define NMAGIC 0x108
#define ZMAGIC 0x10B
#define N_HEADER_IN_TEXT(x) 0
#if 0
#define HP98x6_ID 0x20A
#define HP9000S200_ID 0x20C
#endif
#define HP98x6_ID 0x0A
#define HP9000S200_ID 0x0C
#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
#define N_DATADDR(x) \
((N_MAGIC (x) == OMAGIC || N_MAGIC (x) == HPUX_DOT_O_MAGIC) \
? (N_TXTADDR (x) + N_TXTSIZE (x)) \
: (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
& ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
#define _N_BADMACH(x) \
(((N_MACHTYPE (x)) != HP9000S200_ID) && ((N_MACHTYPE (x)) != HP98x6_ID))
#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
&& N_MAGIC(x) != OMAGIC \
&& N_MAGIC(x) != NMAGIC \
&& N_MAGIC(x) != ZMAGIC )
#undef _N_HDROFF
#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
#undef N_DATOFF
#undef N_PASOFF
#undef N_SYMOFF
#undef N_SUPOFF
#undef N_TRELOFF
#undef N_DRELOFF
#undef N_STROFF
#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
#define N_PASOFF(x) ( N_DATOFF(x) + (x).a_data)
#define N_SYMOFF(x) ( N_PASOFF(x) )
#define N_SUPOFF(x) ( N_SYMOFF(x) + (x).a_syms )
#define N_TRELOFF(x) ( N_SUPOFF(x) )
#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
#define N_EXTHOFF(x) ( N_DRELOFF(x) )
#define N_STROFF(x) ( 0 )
#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x).a_trsize)
#define N_GNU_SYMOFF(x) (N_GNU_DRELOFF(x) + (x).a_drsize)
#define TARGET_PAGE_SIZE 0x1000
#define SEGMENT_SIZE 0x1000
#define TEXT_START_ADDR 0
#undef N_SHARED_LIB
#define N_SHARED_LIB(x) ( 0 )