2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
31 #define _DT_PLTRELSZ 2
47 #define _R_AARCH64_NONE 0
48 #define _R_AARCH64_ABS64 257
49 #define _R_AARCH64_RELATIVE 1027
50 #define _R_AARCH64_IRELATIVE 1032
51 #define _R_AARCH64_GLOB_DAT 1025
52 #define _R_AARCH64_JUMP_SLOT 1026
53 #define _R_AARCH64_RELATIVE 1027
71 #define _DT_PLTRELSZ 2
75 #define _R_ARM_ABS32 2
76 #define _R_ARM_GLOB_DAT 21
77 #define _R_ARM_JUMP_SLOT 22
78 #define _R_ARM_RELATIVE 23
83 typedef unsigned short _Elf_Half
;
85 typedef unsigned int _Elf_Word
;
86 typedef int _Elf_Sword
;
88 typedef unsigned long long _Elf_Xword
;
89 typedef long long _Elf_Sxword
;
91 typedef unsigned long long _Elf_Addr
;
93 typedef unsigned long long _Elf_Off
;
95 typedef unsigned short _Elf_Section
;
97 #define _EI_NIDENT (16)
101 unsigned char e_ident
[_EI_NIDENT
];
110 _Elf_Half e_phentsize
;
112 _Elf_Half e_shentsize
;
114 _Elf_Half e_shstrndx
;
129 _Elf_Xword sh_addralign
;
130 _Elf_Xword sh_entsize
;
133 #else //__TARGET_32__
144 _Elf_Word sh_addralign
;
145 _Elf_Word sh_entsize
;
148 #endif //__TARGET_64__ | __TARGET_32__
154 unsigned char st_info
;
155 unsigned char st_other
;
156 _Elf_Section st_shndx
;
161 #else //__TARGET_32__
167 unsigned char st_info
;
168 unsigned char st_other
;
169 _Elf_Section st_shndx
;
172 #endif //__TARGET_64__ | __TARGET_32__
174 #define _ELF_ST_BIND(val) (((unsigned char) (val)) >> 4)
175 #define _ELF_ST_TYPE(val) ((val) & 0xf)
176 #define _ELF_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
181 _Elf_Addr r_offset
; /* Address */
182 _Elf_Xword r_info
; /* Relocation type and symbol index */
183 _Elf_Sxword r_addend
; /* Addend */
186 #define _ELF_R_SYM(i) ((i) >> 32)
187 #define _ELF_R_TYPE(i) ((i) & 0xffffffff)
189 #else //__TARGET_32__
192 _Elf_Addr r_offset
; /* Address */
193 _Elf_Word r_info
; /* Relocation type and symbol index */
196 #define _ELF_R_SYM(val) ((val) >> 8)
197 #define _ELF_R_TYPE(val) ((val) & 0xff)
199 #endif //__TARGET_64__ | __TARGET_32__
204 _Elf_Word p_type
; /* Segment type */
205 _Elf_Word p_flags
; /* Segment flags */
206 _Elf_Off p_offset
; /* Segment file offset */
207 _Elf_Addr p_vaddr
; /* Segment virtual address */
208 _Elf_Addr p_paddr
; /* Segment physical address */
209 _Elf_Xword p_filesz
; /* Segment size in file */
210 _Elf_Xword p_memsz
; /* Segment size in memory */
211 _Elf_Xword p_align
; /* Segment alignment */
214 #else //__TARGET_32__
217 _Elf_Word p_type
; /* Segment type */
218 _Elf_Off p_offset
; /* Segment file offset */
219 _Elf_Addr p_vaddr
; /* Segment virtual address */
220 _Elf_Addr p_paddr
; /* Segment physical address */
221 _Elf_Word p_filesz
; /* Segment size in file */
222 _Elf_Word p_memsz
; /* Segment size in memory */
223 _Elf_Word p_flags
; /* Segment flags */
224 _Elf_Word p_align
; /* Segment alignment */
227 #endif //__TARGET_64__ | __TARGET_32__
232 _Elf_Sxword d_tag
; /* Dynamic entry type */
235 _Elf_Xword d_val
; /* Integer value */
236 _Elf_Addr d_ptr
; /* Address value */
240 #else //__TARGET_32__
243 _Elf_Sword d_tag
; /* Dynamic entry type */
246 _Elf_Word d_val
; /* Integer value */
247 _Elf_Addr d_ptr
; /* Address value */
251 #endif //__TARGET_64__ | __TARGET_32__