Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


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


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/