File:  [Isaki's NoNo m68k/m88k emulator] / nono / host / aout.h
Revision 1.1.1.4 (vendor branch): download - view: text, annotated - select for diffs
Wed Apr 29 17:05:11 2026 UTC (3 months ago) by root
Branches: MAIN, Isaki
CVS tags: v027, v026, v025, v024, v023, v022, v021, v020, v019, v018, v017, v016, v015, HEAD
nono 0.3.0

//
// nono
// Copyright (C) 2020 nono project
// Licensed under nono-license.txt
//

#pragma once

#include "header.h"

// NetBSD の <sys/exec_aout.h>、<sys/aout_mids.h> あたり参考。

#define AOUT_MID(x)		(((x) >> 16) & 0x3ff)
#define AOUT_MAGIC(x)	((x) & 0xffff)
#define AOUT_OMAGIC		(0x0107)
#define AOUT_NMAGIC		(0x0108)
#define AOUT_ZMAGIC		(0x010b)

struct aout_header {
	// magic はネットワークバイトオーダ。
	//
	//     3                   2                   1                   0
	//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
	// +------------+-------------------+-------------------------------+
	// |    flags   |    machine id     |               magic           |
	// +------------+-------------------+-------------------------------+
	uint32 magic;
	// 以下はホストバイトオーダ。
	uint32 textsize;
	uint32 datasize;
	uint32 bsssize;
	uint32 symsize;
	uint32 entry;
	uint32 textrelsize;
	uint32 datarelsize;
};

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.