[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / procMgr / hlos / knl / loaders / Elf / Qnx / DLOAD / DLOAD / virtual_targets.h
1 /******************************************************************************
2 * Copyright (c) 2012-2015, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Property of Texas Instruments Incorporated. Restricted rights to use,
6 * duplicate or disclose this code are granted through contract.
7 ******************************************************************************/
8 #include "dload.h"
9 #include "elf32.h"
11 #ifdef C60_TARGET
12 #include "c60_dynamic.h"
13 #include "c60_reloc.h"
14 #endif
16 #ifdef ARM_TARGET
17 #include "arm_dynamic.h"
18 #include "arm_reloc.h"
19 #endif
21 /*****************************************************************************/
22 /* Define a virtual target class to give access to target specific functions */
23 /*****************************************************************************/
24 typedef struct vtarget
25 {
26 int machine_id;
28 BOOL (*relocate_dynamic_tag_info)(DLIMP_Dynamic_Module *dyn_module, int i);
29 BOOL (*process_eiosabi)(DLIMP_Dynamic_Module* dyn_module);
30 BOOL (*process_dynamic_tag)(DLIMP_Dynamic_Module *dyn_module, int i);
31 void (*relocate)(DLOAD_HANDLE handle, LOADER_FILE_DESC *elf_file,
32 DLIMP_Dynamic_Module *dyn_module);
34 } VIRTUAL_TARGET;
38 /*****************************************************************************/
39 /* Populate this for each target supported. */
40 /*****************************************************************************/
41 VIRTUAL_TARGET vt_arr[] = {
43 #ifdef C60_TARGET
44 {
45 EM_TI_C6000,
46 DLDYN_c60_relocate_dynamic_tag_info,
47 DLDYN_c60_process_eiosabi,
48 DLDYN_c60_process_dynamic_tag,
49 DLREL_c60_relocate
50 },
51 #endif
52 #ifdef ARM_TARGET
53 {
54 EM_ARM,
55 DLDYN_arm_relocate_dynamic_tag_info,
56 DLDYN_arm_process_eiosabi,
57 DLDYN_arm_process_dynamic_tag,
58 DLREL_arm_relocate
59 },
60 #endif
61 {
62 EM_NONE,
63 0,
64 0,
65 0,
66 0
67 }
68 };