Lines Matching refs:sechdrs
138 const Elf64_Shdr *sechdrs) in get_stubs_size() argument
146 if (sechdrs[i].sh_type == SHT_RELA) { in get_stubs_size()
149 (void *)sechdrs[i].sh_addr, in get_stubs_size()
150 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_stubs_size()
157 sort((void *)sechdrs[i].sh_addr, in get_stubs_size()
158 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_stubs_size()
161 relocs += count_relocs((void *)sechdrs[i].sh_addr, in get_stubs_size()
162 sechdrs[i].sh_size in get_stubs_size()
201 Elf64_Shdr *sechdrs, in module_frob_arch_sections() argument
210 if (strcmp(secstrings + sechdrs[i].sh_name, ".stubs") == 0) in module_frob_arch_sections()
212 else if (strcmp(secstrings + sechdrs[i].sh_name, ".toc") == 0) in module_frob_arch_sections()
214 else if (strcmp(secstrings+sechdrs[i].sh_name,"__versions")==0) in module_frob_arch_sections()
215 dedotify_versions((void *)hdr + sechdrs[i].sh_offset, in module_frob_arch_sections()
216 sechdrs[i].sh_size); in module_frob_arch_sections()
219 while ((p = strstr(secstrings + sechdrs[i].sh_name, ".init"))) in module_frob_arch_sections()
222 if (sechdrs[i].sh_type == SHT_SYMTAB) in module_frob_arch_sections()
223 dedotify((void *)hdr + sechdrs[i].sh_offset, in module_frob_arch_sections()
224 sechdrs[i].sh_size / sizeof(Elf64_Sym), in module_frob_arch_sections()
226 + sechdrs[sechdrs[i].sh_link].sh_offset); in module_frob_arch_sections()
242 sechdrs[me->arch.stubs_section].sh_size = get_stubs_size(hdr, sechdrs); in module_frob_arch_sections()
246 int apply_relocate(Elf64_Shdr *sechdrs, in apply_relocate() argument
259 static inline unsigned long my_r2(Elf64_Shdr *sechdrs, struct module *me) in my_r2() argument
261 return sechdrs[me->arch.toc_section].sh_addr + 0x8000; in my_r2()
272 static inline int create_stub(Elf64_Shdr *sechdrs, in create_stub() argument
286 reladdr = (unsigned long)entry - my_r2(sechdrs, me); in create_stub()
303 static unsigned long stub_for_addr(Elf64_Shdr *sechdrs, in stub_for_addr() argument
311 num_stubs = sechdrs[me->arch.stubs_section].sh_size / sizeof(*stubs); in stub_for_addr()
314 stubs = (void *)sechdrs[me->arch.stubs_section].sh_addr; in stub_for_addr()
322 if (!create_stub(sechdrs, &stubs[i], opd, me)) in stub_for_addr()
341 int apply_relocate_add(Elf64_Shdr *sechdrs, in apply_relocate_add() argument
348 Elf64_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
354 sechdrs[relsec].sh_info); in apply_relocate_add()
355 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
357 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
360 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
383 *(unsigned long *)location = my_r2(sechdrs, me); in apply_relocate_add()
388 value -= my_r2(sechdrs, me); in apply_relocate_add()
401 value -= my_r2(sechdrs, me); in apply_relocate_add()
416 value = stub_for_addr(sechdrs, value, me); in apply_relocate_add()
451 me->arch.toc = my_r2(sechdrs, me); in apply_relocate_add()
452 me->arch.tramp = stub_for_addr(sechdrs, in apply_relocate_add()