Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
header.h
Go to the documentation of this file.
1 /*
2  * header.h
3  *
4  * DSP-BIOS Bridge driver support functions for TI OMAP processors.
5  *
6  * Copyright (C) 2005-2006 Texas Instruments, Inc.
7  *
8  * This package is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  *
12  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15  */
16 
17 #include <linux/string.h>
18 #define DL_STRCMP strcmp
19 
20 /* maximum parenthesis nesting in relocation stack expressions */
21 #define STATIC_EXPR_STK_SIZE 10
22 
23 #include <linux/types.h>
24 
25 #include "doff.h"
27 #include "params.h"
28 #include "dload_internal.h"
29 #include "reloc_table.h"
30 
31 /*
32  * Plausibility limits
33  *
34  * These limits are imposed upon the input DOFF file as a check for validity.
35  * They are hard limits, in that the load will fail if they are exceeded.
36  * The numbers selected are arbitrary, in that the loader implementation does
37  * not require these limits.
38  */
39 
40 /* maximum number of bytes in string table */
41 #define MAX_REASONABLE_STRINGTAB (0x100000)
42 /* maximum number of code,data,etc. sections */
43 #define MAX_REASONABLE_SECTIONS (200)
44 /* maximum number of linker symbols */
45 #define MAX_REASONABLE_SYMBOLS (100000)
46 
47 /* shift count to align F_BIG with DLOAD_LITTLE */
48 #define ALIGN_COFF_ENDIANNESS 7
49 #define ENDIANNESS_MASK (DF_BYTE_ORDER >> ALIGN_COFF_ENDIANNESS)