GEL  0.99
plugarch40.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <gel/error.h>
#include <gel/gel_plugin.h>
#include <gel/gel_elf.h>
#include "gel_mem.h"

Macros

#define R_ARM_NONE   0
 
#define R_ARM_PC24   1
 
#define R_ARM_ABS32   2
 
#define R_ARM_REL32   3 /* NOT IMPLEMENTED */
 
#define R_ARM_PC13   4 /* NOT IMPLEMENTED */
 
#define R_ARM_ABS16   5 /* NOT IMPLEMENTED */
 
#define R_ARM_ABS12   6 /* NOT IMPLEMENTED */
 
#define R_ARM_THM_ABS5   7 /* NOT IMPLEMENTED */
 
#define R_ARM_ABS8   8 /* NOT IMPLEMENTED */
 
#define R_ARM_SBREL32   9 /* NOT IMPLEMENTED */
 
#define R_ARM_THM_PC22   10 /* NOT IMPLEMENTED */
 
#define R_ARM_THM_PC8   11 /* NOT IMPLEMENTED */
 
#define R_ARM_BREL_ADJ   12 /* TO FIX: R_ARM_AMP_VCALL9 */
 
#define R_ARM_SWI24   13
 
#define R_ARM_THM_SWI8   14
 
#define R_ARM_XPC25   15
 
#define R_ARM_THM_XPC22   16
 
#define R_ARM_TLS_DTPMOD32   17
 
#define R_ARM_TLS_DTPOFF32   18
 
#define R_ARM_TLS_TPOFF32   19
 
#define R_ARM_COPY   20
 
#define R_ARM_GLOB_DAT   21
 
#define R_ARM_JUMP_SLOT   22
 
#define R_ARM_RELATIVE   23
 
#define R_ARM_PLT32   27
 
#define R_ARM_CALL   28 /* NOT IMPLEMENTED */
 
#define R_ARM_JUMP24   29 /* NOT IMPLEMENTED */
 
#define R_ARM_THM_JUMP24   30 /* NOT IMPLEMENTED */
 
#define R_ARM_BASE_ABS   31 /* NOT IMPLEMENTED */
 
#define R_ARM_ALU_PCREL_7_0   32
 
#define R_ARM_ALU_PCREL_15_8   33
 
#define R_ARM_ALU_PCREL_23_15   34
 
#define R_ARM_LDR_SBREL_11_0_NC   35
 
#define R_ARM_ALU_SBREL_19_12_NC   36
 
#define R_ARM_ALU_SBREL_27_20_CK   37
 
#define R_ARM_RELABS32   38 /* NOT IMPLEMENTED */
 
#define R_ARM_SBREL31   39 /* TO FIX: R_ARM_ROSEGREL32 */
 
#define R_ARM_V4EX   40 /* NOT IMPLEMENTED */
 
#define R_ARM_STKCHK   41 /* NOT IMPLEMENTED */
 
#define R_ARM_THM_STKCHK   42 /* NOT IMPLEMENTED */
 
#define R_ARM_MOVW_ABS_NC   43 /* NOT IMPLEMENTED */
 
#define R_ARM_MOVT_ABS   44 /* NOT IMPLEMENTED */
 
#define R_ARM_MOVW_PREL_NC   45 /* NOT IMPLEMENTED */
 
#define R_ARM_MOVT_PREL   46 /* NOT IMPLEMENTED */
 
#define R_ARM_THM_MOVW_ABS_NC   47
 
#define R_ARM_THM_MOVT_ABS   48
 
#define R_ARM_THM_MOVW_PREL_NC   49
 
#define R_ARM_THM_MOVT_PREL   50
 
#define R_ARM_THM_JUMP19   51 /* Static Thumb32 ((S + A) | T) – P */
 
#define R_ARM_THM_JUMP6   52 /* Static Thumb16 S + A – P */
 
#define R_ARM_THM_ALU_PREL_11_0   53 /* Static Thumb32 ((S + A) | T) – Pa */
 
#define R_ARM_THM_PC12   54 /* Static Thumb32 S + A – Pa */
 
#define R_ARM_ABS32_NOI   55 /* Static Data S + A */
 
#define R_ARM_REL32_NOI   56 /* Static Data S + A – P */
 
#define R_ARM_ALU_PC_G0_NC   57 /* Static ARM ((S + A) | T) – P */
 
#define R_ARM_ALU_PC_G0   58 /* Static ARM ((S + A) | T) – P */
 
#define R_ARM_ALU_PC_G1_NC   59 /* Static ARM ((S + A) | T) – P */
 
#define R_ARM_ALU_PC_G1   60 /* Static ARM ((S + A) | T) – P */
 
#define R_ARM_ALU_PC_G2   61 /* Static ARM ((S + A) | T) – P */
 
#define R_ARM_LDR_PC_G1   62 /* Static ARM S + A – P */
 
#define R_ARM_LDR_PC_G2   63 /* Static ARM S + A – P */
 
#define R_ARM_LDRS_PC_G0   64 /* Static ARM S + A – P */
 
#define R_ARM_LDRS_PC_G1   65 /* Static ARM S + A – P */
 
#define R_ARM_LDRS_PC_G2   66 /* Static ARM S + A – P */
 
#define R_ARM_LDC_PC_G0   67 /* Static ARM S + A – P */
 
#define R_ARM_LDC_PC_G1   68 /* Static ARM S + A – P */
 
#define R_ARM_LDC_PC_G2   69 /* Static ARM S + A – P */
 
#define R_ARM_ALU_SB_G0_NC   70 /* Static ARM ((S + A) | T) – B(S) */
 
#define R_ARM_ALU_SB_G0   71 /* Static ARM ((S + A) | T) – B(S) */
 
#define R_ARM_ALU_SB_G1_NC   72 /* Static ARM ((S + A) | T) – B(S) */
 
#define R_ARM_ALU_SB_G1   73 /* Static ARM ((S + A) | T) – B(S) */
 
#define R_ARM_ALU_SB_G2   74 /* Static ARM ((S + A) | T) – B(S) */
 
#define R_ARM_LDR_SB_G0   75 /* Static ARM S + A – B(S) */
 
#define R_ARM_LDR_SB_G1   76 /* Static ARM S + A – B(S) */
 
#define R_ARM_LDR_SB_G2   77 /* Static ARM S + A – B(S) */
 
#define R_ARM_LDRS_SB_G0   78 /* Static ARM S + A – B(S) */
 
#define R_ARM_LDRS_SB_G1   79 /* Static ARM S + A – B(S) */
 
#define R_ARM_LDRS_SB_G2   80 /* Static ARM S + A – B(S) */
 
#define R_ARM_LDC_SB_G0   81 /* Static ARM S + A – B(S) */
 
#define R_ARM_LDC_SB_G1   82 /* Static ARM S + A – B(S) */
 
#define R_ARM_LDC_SB_G2   83 /* Static ARM S + A – B(S) */
 
#define R_ARM_MOVW_BREL_NC   84 /* Static ARM ((S + A) | T) – B(S) */
 
#define R_ARM_MOVT_BREL   85 /* Static ARM S + A – B(S) */
 
#define R_ARM_MOVW_BREL   86 /* Static ARM ((S + A) | T) – B(S) */
 
#define R_ARM_THM_MOVW_BREL_NC   87 /* Static Thumb32 ((S + A) | T) – B(S) */
 
#define R_ARM_THM_MOVT_BREL   88 /* Static Thumb32 S + A – B(S) */
 
#define R_ARM_THM_MOVW_BREL   89 /* Static Thumb32 ((S + A) | T) – B(S) */
 
#define R_ARM_TLS_GOTDESC   90 /* Static Data */
 
#define R_ARM_TLS_CALL   91 /* Static ARM */
 
#define R_ARM_TLS_DESCSEQ   92 /* Static ARM */
 
#define R_ARM_THM_TLS_CALL   93 /* Static Thumb32 */
 
#define R_ARM_PLT32_ABS   94 /* Static Data PLT(S) + A */
 
#define R_ARM_GOT_ABS   95 /* Static Data GOT(S) + A */
 
#define R_ARM_GOT_PREL   96 /* Static Data GOT(S) + A – P */
 
#define R_ARM_GOT_BREL12   97 /* Static ARM GOT(S) + A – GOT_ORG */
 
#define R_ARM_GOTOFF12   98 /* Static ARM S + A – GOT_ORG */
 
#define R_ARM_GOTRELAX   99 /* Static Miscellaneous */
 
#define R_ARM_GNU_VTENTRY   100 /* Deprecated Data ??? */
 
#define R_ARM_GNU_VTINHERIT   101 /* Deprecated Data ??? */
 
#define R_ARM_THM_JUMP11   102 /* Static Thumb16 S + A – P */
 
#define R_ARM_THM_JUMP8   103 /* Static Thumb16 S + A – P */
 
#define R_ARM_TLS_GD32   104 /* Static Data GOT(S) + A – P */
 
#define R_ARM_TLS_LDM32   105 /* Static Data GOT(S) + A – P */
 
#define R_ARM_TLS_LDO32   106 /* Static Data S + A – TLS */
 
#define R_ARM_TLS_IE32   107 /* Static Data GOT(S) + A – P */
 
#define R_ARM_TLS_LE32   108 /* Static Data S + A – tp */
 
#define R_ARM_TLS_LDO12   109 /* Static ARM S + A – TLS */
 
#define R_ARM_TLS_LE12   Static 110 /* ARM S + A – tp */
 
#define R_ARM_TLS_IE12GP   111 /* Static ARM GOT(S) + A – GOT_ORG */
 
#define R_ARM_ME_TOO   128 /* Obsolete */
 
#define R_ARM_THM_TLS_DESCSEQ16   129 /* Static Thumb16 */
 
#define R_ARM_THM_TLS_DESCSEQ32   130 /* Static Thumb32 */
 
#define R_ARM_THM_GOT_BREL12   131 /* Static Thumb32 */
 
#define R_ARM_THM_ALU_ABS_G0_NC   132 /* Static Thumb16 (S + A) | T */
 
#define R_ARM_THM_ALU_ABS_G1_NC   133 /* Static Thumb16 S + A */
 
#define R_ARM_THM_ALU_ABS_G2_NC   134 /* Static Thumb16 S + A */
 
#define R_ARM_THM_ALU_ABS_G3   135 /* Static Thumb16 S + A */
 
#define R_ARM_IRELATIVE   160 /* Reserved for future functionality */
 
#define R_ARM_RXPC25   249 /* ARMELF 6 */
 
#define R_ARM_RSBREL32   250 /* ARMELF 6 */
 
#define R_ARM_THM_RPC22   251 /* ARMELF 6 */
 
#define R_ARM_PREL32   252 /* ARMELF 6 */
 
#define R_ARM_RABS32   253 /* ARMELF 6 */
 
#define R_ARM_RPC24   254 /* ARMELF 6 */
 
#define R_ARM_RBASE   255 /* ARMELF 6 */
 
#define USESYM   ((symi.sect == SHN_UNDEF) ? (symi2) : (symi))
 

Typedefs

typedef struct context_t context_t
 

Functions

int real_do_reloc (gel_image_t *im, gel_hash_t h, int flags, int do_copy)
 
int do_reloc (gel_image_t *im, int flags)
 

Variables

int gel_errno
 
arch_plugin_t plugin_arch
 
sys_plugin_t null_plugin_sys
 
sys_plugin_tplugin_sys = &null_plugin_sys
 

Macro Definition Documentation

◆ R_ARM_ABS12

#define R_ARM_ABS12   6 /* NOT IMPLEMENTED */

◆ R_ARM_ABS16

#define R_ARM_ABS16   5 /* NOT IMPLEMENTED */

◆ R_ARM_ABS32

#define R_ARM_ABS32   2

◆ R_ARM_ABS32_NOI

#define R_ARM_ABS32_NOI   55 /* Static Data S + A */

◆ R_ARM_ABS8

#define R_ARM_ABS8   8 /* NOT IMPLEMENTED */

◆ R_ARM_ALU_PC_G0

#define R_ARM_ALU_PC_G0   58 /* Static ARM ((S + A) | T) – P */

◆ R_ARM_ALU_PC_G0_NC

#define R_ARM_ALU_PC_G0_NC   57 /* Static ARM ((S + A) | T) – P */

◆ R_ARM_ALU_PC_G1

#define R_ARM_ALU_PC_G1   60 /* Static ARM ((S + A) | T) – P */

◆ R_ARM_ALU_PC_G1_NC

#define R_ARM_ALU_PC_G1_NC   59 /* Static ARM ((S + A) | T) – P */

◆ R_ARM_ALU_PC_G2

#define R_ARM_ALU_PC_G2   61 /* Static ARM ((S + A) | T) – P */

◆ R_ARM_ALU_PCREL_15_8

#define R_ARM_ALU_PCREL_15_8   33

◆ R_ARM_ALU_PCREL_23_15

#define R_ARM_ALU_PCREL_23_15   34

◆ R_ARM_ALU_PCREL_7_0

#define R_ARM_ALU_PCREL_7_0   32

◆ R_ARM_ALU_SB_G0

#define R_ARM_ALU_SB_G0   71 /* Static ARM ((S + A) | T) – B(S) */

◆ R_ARM_ALU_SB_G0_NC

#define R_ARM_ALU_SB_G0_NC   70 /* Static ARM ((S + A) | T) – B(S) */

◆ R_ARM_ALU_SB_G1

#define R_ARM_ALU_SB_G1   73 /* Static ARM ((S + A) | T) – B(S) */

◆ R_ARM_ALU_SB_G1_NC

#define R_ARM_ALU_SB_G1_NC   72 /* Static ARM ((S + A) | T) – B(S) */

◆ R_ARM_ALU_SB_G2

#define R_ARM_ALU_SB_G2   74 /* Static ARM ((S + A) | T) – B(S) */

◆ R_ARM_ALU_SBREL_19_12_NC

#define R_ARM_ALU_SBREL_19_12_NC   36

◆ R_ARM_ALU_SBREL_27_20_CK

#define R_ARM_ALU_SBREL_27_20_CK   37

◆ R_ARM_BASE_ABS

#define R_ARM_BASE_ABS   31 /* NOT IMPLEMENTED */

◆ R_ARM_BREL_ADJ

#define R_ARM_BREL_ADJ   12 /* TO FIX: R_ARM_AMP_VCALL9 */

◆ R_ARM_CALL

#define R_ARM_CALL   28 /* NOT IMPLEMENTED */

◆ R_ARM_COPY

#define R_ARM_COPY   20

◆ R_ARM_GLOB_DAT

#define R_ARM_GLOB_DAT   21

◆ R_ARM_GNU_VTENTRY

#define R_ARM_GNU_VTENTRY   100 /* Deprecated Data ??? */

◆ R_ARM_GNU_VTINHERIT

#define R_ARM_GNU_VTINHERIT   101 /* Deprecated Data ??? */

◆ R_ARM_GOT_ABS

#define R_ARM_GOT_ABS   95 /* Static Data GOT(S) + A */

◆ R_ARM_GOT_BREL12

#define R_ARM_GOT_BREL12   97 /* Static ARM GOT(S) + A – GOT_ORG */

◆ R_ARM_GOT_PREL

#define R_ARM_GOT_PREL   96 /* Static Data GOT(S) + A – P */

◆ R_ARM_GOTOFF12

#define R_ARM_GOTOFF12   98 /* Static ARM S + A – GOT_ORG */

◆ R_ARM_GOTRELAX

#define R_ARM_GOTRELAX   99 /* Static Miscellaneous */

◆ R_ARM_IRELATIVE

#define R_ARM_IRELATIVE   160 /* Reserved for future functionality */

◆ R_ARM_JUMP24

#define R_ARM_JUMP24   29 /* NOT IMPLEMENTED */

◆ R_ARM_JUMP_SLOT

#define R_ARM_JUMP_SLOT   22

◆ R_ARM_LDC_PC_G0

#define R_ARM_LDC_PC_G0   67 /* Static ARM S + A – P */

◆ R_ARM_LDC_PC_G1

#define R_ARM_LDC_PC_G1   68 /* Static ARM S + A – P */

◆ R_ARM_LDC_PC_G2

#define R_ARM_LDC_PC_G2   69 /* Static ARM S + A – P */

◆ R_ARM_LDC_SB_G0

#define R_ARM_LDC_SB_G0   81 /* Static ARM S + A – B(S) */

◆ R_ARM_LDC_SB_G1

#define R_ARM_LDC_SB_G1   82 /* Static ARM S + A – B(S) */

◆ R_ARM_LDC_SB_G2

#define R_ARM_LDC_SB_G2   83 /* Static ARM S + A – B(S) */

◆ R_ARM_LDR_PC_G1

#define R_ARM_LDR_PC_G1   62 /* Static ARM S + A – P */

◆ R_ARM_LDR_PC_G2

#define R_ARM_LDR_PC_G2   63 /* Static ARM S + A – P */

◆ R_ARM_LDR_SB_G0

#define R_ARM_LDR_SB_G0   75 /* Static ARM S + A – B(S) */

◆ R_ARM_LDR_SB_G1

#define R_ARM_LDR_SB_G1   76 /* Static ARM S + A – B(S) */

◆ R_ARM_LDR_SB_G2

#define R_ARM_LDR_SB_G2   77 /* Static ARM S + A – B(S) */

◆ R_ARM_LDR_SBREL_11_0_NC

#define R_ARM_LDR_SBREL_11_0_NC   35

◆ R_ARM_LDRS_PC_G0

#define R_ARM_LDRS_PC_G0   64 /* Static ARM S + A – P */

◆ R_ARM_LDRS_PC_G1

#define R_ARM_LDRS_PC_G1   65 /* Static ARM S + A – P */

◆ R_ARM_LDRS_PC_G2

#define R_ARM_LDRS_PC_G2   66 /* Static ARM S + A – P */

◆ R_ARM_LDRS_SB_G0

#define R_ARM_LDRS_SB_G0   78 /* Static ARM S + A – B(S) */

◆ R_ARM_LDRS_SB_G1

#define R_ARM_LDRS_SB_G1   79 /* Static ARM S + A – B(S) */

◆ R_ARM_LDRS_SB_G2

#define R_ARM_LDRS_SB_G2   80 /* Static ARM S + A – B(S) */

◆ R_ARM_ME_TOO

#define R_ARM_ME_TOO   128 /* Obsolete */

◆ R_ARM_MOVT_ABS

#define R_ARM_MOVT_ABS   44 /* NOT IMPLEMENTED */

◆ R_ARM_MOVT_BREL

#define R_ARM_MOVT_BREL   85 /* Static ARM S + A – B(S) */

◆ R_ARM_MOVT_PREL

#define R_ARM_MOVT_PREL   46 /* NOT IMPLEMENTED */

◆ R_ARM_MOVW_ABS_NC

#define R_ARM_MOVW_ABS_NC   43 /* NOT IMPLEMENTED */

◆ R_ARM_MOVW_BREL

#define R_ARM_MOVW_BREL   86 /* Static ARM ((S + A) | T) – B(S) */

◆ R_ARM_MOVW_BREL_NC

#define R_ARM_MOVW_BREL_NC   84 /* Static ARM ((S + A) | T) – B(S) */

◆ R_ARM_MOVW_PREL_NC

#define R_ARM_MOVW_PREL_NC   45 /* NOT IMPLEMENTED */

◆ R_ARM_NONE

#define R_ARM_NONE   0

◆ R_ARM_PC13

#define R_ARM_PC13   4 /* NOT IMPLEMENTED */

◆ R_ARM_PC24

#define R_ARM_PC24   1

◆ R_ARM_PLT32

#define R_ARM_PLT32   27

◆ R_ARM_PLT32_ABS

#define R_ARM_PLT32_ABS   94 /* Static Data PLT(S) + A */

◆ R_ARM_PREL32

#define R_ARM_PREL32   252 /* ARMELF 6 */

◆ R_ARM_RABS32

#define R_ARM_RABS32   253 /* ARMELF 6 */

◆ R_ARM_RBASE

#define R_ARM_RBASE   255 /* ARMELF 6 */

◆ R_ARM_REL32

#define R_ARM_REL32   3 /* NOT IMPLEMENTED */

◆ R_ARM_REL32_NOI

#define R_ARM_REL32_NOI   56 /* Static Data S + A – P */

◆ R_ARM_RELABS32

#define R_ARM_RELABS32   38 /* NOT IMPLEMENTED */

◆ R_ARM_RELATIVE

#define R_ARM_RELATIVE   23

◆ R_ARM_RPC24

#define R_ARM_RPC24   254 /* ARMELF 6 */

◆ R_ARM_RSBREL32

#define R_ARM_RSBREL32   250 /* ARMELF 6 */

◆ R_ARM_RXPC25

#define R_ARM_RXPC25   249 /* ARMELF 6 */

◆ R_ARM_SBREL31

#define R_ARM_SBREL31   39 /* TO FIX: R_ARM_ROSEGREL32 */

◆ R_ARM_SBREL32

#define R_ARM_SBREL32   9 /* NOT IMPLEMENTED */

◆ R_ARM_STKCHK

#define R_ARM_STKCHK   41 /* NOT IMPLEMENTED */

◆ R_ARM_SWI24

#define R_ARM_SWI24   13

◆ R_ARM_THM_ABS5

#define R_ARM_THM_ABS5   7 /* NOT IMPLEMENTED */

◆ R_ARM_THM_ALU_ABS_G0_NC

#define R_ARM_THM_ALU_ABS_G0_NC   132 /* Static Thumb16 (S + A) | T */

◆ R_ARM_THM_ALU_ABS_G1_NC

#define R_ARM_THM_ALU_ABS_G1_NC   133 /* Static Thumb16 S + A */

◆ R_ARM_THM_ALU_ABS_G2_NC

#define R_ARM_THM_ALU_ABS_G2_NC   134 /* Static Thumb16 S + A */

◆ R_ARM_THM_ALU_ABS_G3

#define R_ARM_THM_ALU_ABS_G3   135 /* Static Thumb16 S + A */

◆ R_ARM_THM_ALU_PREL_11_0

#define R_ARM_THM_ALU_PREL_11_0   53 /* Static Thumb32 ((S + A) | T) – Pa */

◆ R_ARM_THM_GOT_BREL12

#define R_ARM_THM_GOT_BREL12   131 /* Static Thumb32 */

◆ R_ARM_THM_JUMP11

#define R_ARM_THM_JUMP11   102 /* Static Thumb16 S + A – P */

◆ R_ARM_THM_JUMP19

#define R_ARM_THM_JUMP19   51 /* Static Thumb32 ((S + A) | T) – P */

◆ R_ARM_THM_JUMP24

#define R_ARM_THM_JUMP24   30 /* NOT IMPLEMENTED */

◆ R_ARM_THM_JUMP6

#define R_ARM_THM_JUMP6   52 /* Static Thumb16 S + A – P */

◆ R_ARM_THM_JUMP8

#define R_ARM_THM_JUMP8   103 /* Static Thumb16 S + A – P */

◆ R_ARM_THM_MOVT_ABS

#define R_ARM_THM_MOVT_ABS   48

◆ R_ARM_THM_MOVT_BREL

#define R_ARM_THM_MOVT_BREL   88 /* Static Thumb32 S + A – B(S) */

◆ R_ARM_THM_MOVT_PREL

#define R_ARM_THM_MOVT_PREL   50

◆ R_ARM_THM_MOVW_ABS_NC

#define R_ARM_THM_MOVW_ABS_NC   47

◆ R_ARM_THM_MOVW_BREL

#define R_ARM_THM_MOVW_BREL   89 /* Static Thumb32 ((S + A) | T) – B(S) */

◆ R_ARM_THM_MOVW_BREL_NC

#define R_ARM_THM_MOVW_BREL_NC   87 /* Static Thumb32 ((S + A) | T) – B(S) */

◆ R_ARM_THM_MOVW_PREL_NC

#define R_ARM_THM_MOVW_PREL_NC   49

◆ R_ARM_THM_PC12

#define R_ARM_THM_PC12   54 /* Static Thumb32 S + A – Pa */

◆ R_ARM_THM_PC22

#define R_ARM_THM_PC22   10 /* NOT IMPLEMENTED */

◆ R_ARM_THM_PC8

#define R_ARM_THM_PC8   11 /* NOT IMPLEMENTED */

◆ R_ARM_THM_RPC22

#define R_ARM_THM_RPC22   251 /* ARMELF 6 */

◆ R_ARM_THM_STKCHK

#define R_ARM_THM_STKCHK   42 /* NOT IMPLEMENTED */

◆ R_ARM_THM_SWI8

#define R_ARM_THM_SWI8   14

◆ R_ARM_THM_TLS_CALL

#define R_ARM_THM_TLS_CALL   93 /* Static Thumb32 */

◆ R_ARM_THM_TLS_DESCSEQ16

#define R_ARM_THM_TLS_DESCSEQ16   129 /* Static Thumb16 */

◆ R_ARM_THM_TLS_DESCSEQ32

#define R_ARM_THM_TLS_DESCSEQ32   130 /* Static Thumb32 */

◆ R_ARM_THM_XPC22

#define R_ARM_THM_XPC22   16

◆ R_ARM_TLS_CALL

#define R_ARM_TLS_CALL   91 /* Static ARM */

◆ R_ARM_TLS_DESCSEQ

#define R_ARM_TLS_DESCSEQ   92 /* Static ARM */

◆ R_ARM_TLS_DTPMOD32

#define R_ARM_TLS_DTPMOD32   17

◆ R_ARM_TLS_DTPOFF32

#define R_ARM_TLS_DTPOFF32   18

◆ R_ARM_TLS_GD32

#define R_ARM_TLS_GD32   104 /* Static Data GOT(S) + A – P */

◆ R_ARM_TLS_GOTDESC

#define R_ARM_TLS_GOTDESC   90 /* Static Data */

◆ R_ARM_TLS_IE12GP

#define R_ARM_TLS_IE12GP   111 /* Static ARM GOT(S) + A – GOT_ORG */

◆ R_ARM_TLS_IE32

#define R_ARM_TLS_IE32   107 /* Static Data GOT(S) + A – P */

◆ R_ARM_TLS_LDM32

#define R_ARM_TLS_LDM32   105 /* Static Data GOT(S) + A – P */

◆ R_ARM_TLS_LDO12

#define R_ARM_TLS_LDO12   109 /* Static ARM S + A – TLS */

◆ R_ARM_TLS_LDO32

#define R_ARM_TLS_LDO32   106 /* Static Data S + A – TLS */

◆ R_ARM_TLS_LE12

#define R_ARM_TLS_LE12   Static 110 /* ARM S + A – tp */

◆ R_ARM_TLS_LE32

#define R_ARM_TLS_LE32   108 /* Static Data S + A – tp */

◆ R_ARM_TLS_TPOFF32

#define R_ARM_TLS_TPOFF32   19

◆ R_ARM_V4EX

#define R_ARM_V4EX   40 /* NOT IMPLEMENTED */

◆ R_ARM_XPC25

#define R_ARM_XPC25   15

◆ USESYM

#define USESYM   ((symi.sect == SHN_UNDEF) ? (symi2) : (symi))

Typedef Documentation

◆ context_t

typedef struct context_t context_t

Function Documentation

◆ do_reloc()

int do_reloc ( gel_image_t im,
int  flags 
)

Perform relocation for the given image.

Parameters
imImage to work on.
flagsConfiguration flags.

◆ real_do_reloc()

int real_do_reloc ( gel_image_t im,
gel_hash_t  h,
int  flags,
int  do_copy 
)

Perform the relocation.

Parameters
imImage where the relocation is performed.
hHash table containing source addresses.
flagsFlags.
do_copyPass number (0: normal, 1: do R_xxx_COPY)
Returns
Error code.

Variable Documentation

◆ null_plugin_sys

sys_plugin_t null_plugin_sys
extern

Null plugin for architecture.

◆ plugin_arch

arch_plugin_t plugin_arch
Initial value:
= {
40,
1,
2,
NULL,
1,
4096,
}
int do_reloc(gel_image_t *im, int flags)
Definition: plugarch40.c:549

◆ plugin_sys

sys_plugin_t* plugin_sys = &null_plugin_sys