/*
* m68k a.out / ELF file structure definitions
*
* written by ITOH Yasufumi
* public domain
*
* $NetBSD: aout68k.h,v 1.4 2011/02/21 02:31:58 itohy Exp $
*/
/*
* NetBSD/m68k a.out format (OMAGIC, NMAGIC)
*
* ----------------------------
* | file header (32 bytes) |
* |--------------------------|
* | text |
* |--------------------------|
* | data |
* |--------------------------|
* | text relocation table |
* |--------------------------|
* | data relocation table |
* |--------------------------|
* | symbol table |
* |--------------------------|
* | string table |
* ----------------------------
*
* OMAGIC: text and data segments are loaded contiguous
* NMAGIC: data segment is loaded at the next page of the text
*/
struct aout_m68k {
be_uint32_t a_magic; /* encoded magic number */
be_uint32_t a_text; /* size of text section */
be_uint32_t a_data; /* size of data section */
be_uint32_t a_bss; /* size of bss */
be_uint32_t a_syms; /* size of symbol table */
be_uint32_t a_entry; /* entry point address */
be_uint32_t a_trsize; /* size of text relocation */
be_uint32_t a_drsize; /* size of data relocation */
};
#define AOUT_GET_MAGIC(e) (((e)->a_magic.val[2]<<8) | (e)->a_magic.val[3])
#define AOUT_OMAGIC 0407
#define AOUT_NMAGIC 0410
#define AOUT_ZMAGIC 0413 /* demand paging --- header is in the text */