source: svn/trunk/newcon3bcm2_21bu/toolchain/mips-linux-uclibc/include/linux/flat.h

Last change on this file was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 2.0 KB
RevLine 
[2]1/*
2 * Copyright (C) 2002-2003  David McCullough <davidm@snapgear.com>
3 * Copyright (C) 1998       Kenneth Albanowski <kjahds@kjahds.com>
4 *                          The Silver Hammer Group, Ltd.
5 *
6 * This file provides the definitions and structures needed to
7 * support uClinux flat-format executables.
8 */
9
10#ifndef _LINUX_FLAT_H
11#define _LINUX_FLAT_H
12
13#define FLAT_VERSION                    0x00000004L
14
15#ifdef CONFIG_BINFMT_SHARED_FLAT
16#define MAX_SHARED_LIBS                 (4)
17#else
18#define MAX_SHARED_LIBS                 (1)
19#endif
20
21/*
22 * To make everything easier to port and manage cross platform
23 * development,  all fields are in network byte order.
24 */
25
26struct flat_hdr {
27        char magic[4];
28        unsigned long rev;          /* version (as above) */
29        unsigned long entry;        /* Offset of first executable instruction
30                                       with text segment from beginning of file */
31        unsigned long data_start;   /* Offset of data segment from beginning of
32                                       file */
33        unsigned long data_end;     /* Offset of end of data segment
34                                       from beginning of file */
35        unsigned long bss_end;      /* Offset of end of bss segment from beginning
36                                       of file */
37
38        /* (It is assumed that data_end through bss_end forms the bss segment.) */
39
40        unsigned long stack_size;   /* Size of stack, in bytes */
41        unsigned long reloc_start;  /* Offset of relocation records from
42                                       beginning of file */
43        unsigned long reloc_count;  /* Number of relocation records */
44        unsigned long flags;       
45        unsigned long build_date;   /* When the program/library was built */
46        unsigned long filler[5];    /* Reservered, set to zero */
47};
48
49#define FLAT_FLAG_RAM    0x0001 /* load program entirely into RAM */
50#define FLAT_FLAG_GOTPIC 0x0002 /* program is PIC with GOT */
51#define FLAT_FLAG_GZIP   0x0004 /* all but the header is compressed */
52#define FLAT_FLAG_GZDATA 0x0008 /* only data/relocs are compressed (for XIP) */
53#define FLAT_FLAG_KTRACE 0x0010 /* output useful kernel trace for debugging */
54
55
56#endif /* _LINUX_FLAT_H */
Note: See TracBrowser for help on using the repository browser.