4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
6 * Copyright (C) 2005-2006 Texas Instruments, Inc.
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.
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.
21 #include <linux/string.h>
22 #define DL_STRCMP strcmp
24 /* maximum parenthesis nesting in relocation stack expressions */
25 #define STATIC_EXPR_STK_SIZE 10
27 #include <linux/types.h>
30 #include <dspbridge/dynamic_loader.h>
32 #include "dload_internal.h"
33 #include "reloc_table.h"
38 * These limits are imposed upon the input DOFF file as a check for validity.
39 * They are hard limits, in that the load will fail if they are exceeded.
40 * The numbers selected are arbitrary, in that the loader implementation does
41 * not require these limits.
44 /* maximum number of bytes in string table */
45 #define MAX_REASONABLE_STRINGTAB (0x100000)
46 /* maximum number of code,data,etc. sections */
47 #define MAX_REASONABLE_SECTIONS (200)
48 /* maximum number of linker symbols */
49 #define MAX_REASONABLE_SYMBOLS (100000)
51 /* shift count to align F_BIG with DLOAD_LITTLE */
52 #define ALIGN_COFF_ENDIANNESS 7
53 #define ENDIANNESS_MASK (DF_BYTE_ORDER >> ALIGN_COFF_ENDIANNESS)