1 |
786 |
skrzyp |
#ifndef __RELOCATE_ARM_H__
|
2 |
|
|
#define __RELOCATE_ARM_H__
|
3 |
|
|
|
4 |
|
|
/* =================================================================
|
5 |
|
|
*
|
6 |
|
|
* relocate_arm.h
|
7 |
|
|
*
|
8 |
|
|
* Architecture dependent relocation routines for the ARM
|
9 |
|
|
*
|
10 |
|
|
* =================================================================
|
11 |
|
|
* ####ECOSGPLCOPYRIGHTBEGIN####
|
12 |
|
|
* -------------------------------------------
|
13 |
|
|
* This file is part of eCos, the Embedded Configurable Operating System.
|
14 |
|
|
* Copyright (C) 2008 Free Software Foundation, Inc.
|
15 |
|
|
*
|
16 |
|
|
* eCos is free software; you can redistribute it and/or modify it
|
17 |
|
|
* under the terms of the GNU General Public License as published by
|
18 |
|
|
* the Free Software Foundation; either version 2 or (at your option)
|
19 |
|
|
* any later version.
|
20 |
|
|
*
|
21 |
|
|
* eCos is distributed in the hope that it will be useful, but
|
22 |
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
24 |
|
|
* General Public License for more details.
|
25 |
|
|
*
|
26 |
|
|
* You should have received a copy of the GNU General Public License
|
27 |
|
|
* along with eCos; if not, write to the Free Software Foundation,
|
28 |
|
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
29 |
|
|
*
|
30 |
|
|
* As a special exception, if other files instantiate templates or
|
31 |
|
|
* use macros or inline functions from this file, or you compile this
|
32 |
|
|
* file and link it with other works to produce a work based on this
|
33 |
|
|
* file, this file does not by itself cause the resulting work to be
|
34 |
|
|
* covered by the GNU General Public License. However the source code
|
35 |
|
|
* for this file must still be made available in accordance with
|
36 |
|
|
* section (3) of the GNU General Public License.
|
37 |
|
|
*
|
38 |
|
|
* This exception does not invalidate any other reasons why a work
|
39 |
|
|
* based on this file might be covered by the GNU General Public
|
40 |
|
|
* License.
|
41 |
|
|
*
|
42 |
|
|
* -------------------------------------------
|
43 |
|
|
* ####ECOSGPLCOPYRIGHTEND####
|
44 |
|
|
* =================================================================
|
45 |
|
|
* #####DESCRIPTIONBEGIN####
|
46 |
|
|
*
|
47 |
|
|
* Author(s): Anthony Tonizzo (atonizzo@gmail.com)
|
48 |
|
|
* Contributors: Sergei Gavrikov (sergei.gavrikov@gmail.com)
|
49 |
|
|
* Date: 2008-12-01
|
50 |
|
|
* Purpose:
|
51 |
|
|
* Description:
|
52 |
|
|
*
|
53 |
|
|
* ####DESCRIPTIONEND####
|
54 |
|
|
*
|
55 |
|
|
* =================================================================
|
56 |
|
|
*/
|
57 |
|
|
|
58 |
|
|
#define Elf_Rel 0
|
59 |
|
|
#define Elf_Rela 1
|
60 |
|
|
|
61 |
|
|
#define ELF_ARCH_MACHINE_TYPE 40 // ARM
|
62 |
|
|
#define ELF_ARCH_ENDIANNESS ELFDATA2LSB
|
63 |
|
|
#define ELF_ARCH_RELTYPE Elf_Rel
|
64 |
|
|
|
65 |
|
|
#define R_ARM_PC24 1 // PC relative 26 bit branch.
|
66 |
|
|
#define R_ARM_ABS32 2 // Direct 32 bit.
|
67 |
|
|
#define R_ARM_CALL 28 // PC relative 26 bit call (EABI).
|
68 |
|
|
#define R_ARM_JUMP24 29 // PC relative 26 bit branch (EABI).
|
69 |
|
|
#define R_ARM_V4BX 40 // Fix of interworking for ARMv4 cores.
|
70 |
|
|
|
71 |
|
|
void cyg_ldr_flush_cache(void);
|
72 |
|
|
cyg_int32 cyg_ldr_relocate(cyg_int32, cyg_uint32, cyg_int32);
|
73 |
|
|
extern char *relocation_name[];
|
74 |
|
|
|
75 |
|
|
#endif //__RELOCATE_ARM_H__
|