aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/flat.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 16:28:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 16:28:32 -0400
commit0b381a286e5d748b1fd80095d3dd52326819742f (patch)
treed72fca56123520b9c78661137f8a02b6ad26f95b /include/uapi/linux/flat.h
parent034b5eeb6bc783e7f60e11299154556e65699e7a (diff)
parent5921e6f8809b1616932ca4afd40fe449faa8fd88 (diff)
Merge tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers
Pull UAPI disintegration for include/linux/{,byteorder/}*.h from David Howells: "The patches contained herein do the following: (1) Remove kernel-only stuff in linux/ppp-comp.h from the UAPI. I checked this with Paul Mackerras before I created the patch and he suggested some extra bits to unexport. (2) Remove linux/blk_types.h entirely from the UAPI as none of it is userspace applicable, and remove from the UAPI that part of linux/fs.h that was the reason for linux/blk_types.h being exported in the first place. I discussed this with Jens Axboe before creating the patch. (3) The big patch of the series to disintegrate include/linux/*.h as a unit. This could be split up, though there would be collisions in moving stuff between the two Kbuild files when the parts are merged as that file is sorted alphabetically rather than being grouped by subsystem. Of this set of headers, 17 files have changed in the UAPI exported region since the 4th and only 8 since the 9th so there isn't much change in this area - as one might expect. It should be pretty obvious and straightforward if it does come to fixing up: stuff in __KERNEL__ guards stays where it is and stuff outside moves to the same file in the include/uapi/linux/ directory. If a new file appears then things get a bit more complicated as the "headers +=" line has to move to include/uapi/linux/Kbuild. Only one new file has appeared since the 9th and I judge this type of event relatively unlikely. (4) A patch to disintegrate include/linux/byteorder/*.h as a unit. Signed-off-by: David Howells <dhowells@redhat.com>" * tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: (Scripted) Disintegrate include/linux/byteorder UAPI: (Scripted) Disintegrate include/linux UAPI: Unexport linux/blk_types.h UAPI: Unexport part of linux/ppp-comp.h
Diffstat (limited to 'include/uapi/linux/flat.h')
-rw-r--r--include/uapi/linux/flat.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/uapi/linux/flat.h b/include/uapi/linux/flat.h
new file mode 100644
index 000000000000..88cd6baba8f3
--- /dev/null
+++ b/include/uapi/linux/flat.h
@@ -0,0 +1,58 @@
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 _UAPI_LINUX_FLAT_H
11#define _UAPI_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
27struct 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 /* _UAPI_LINUX_FLAT_H */