Lines Matching +full:nibble +full:- +full:zero
4 * SPDX-License-Identifier: Apache-2.0
20 * flags used (e.g. -fPIC), etc. Also not all relocation table entries should be
47 for (sh_ndx = 0; sh_ndx < ext->sect_cnt; sh_ndx++) { in xtensa_elf_relocate()
48 if (ext->sect_hdrs[sh_ndx].sh_addr <= *got_entry && in xtensa_elf_relocate()
50 ext->sect_hdrs[sh_ndx].sh_addr + ext->sect_hdrs[sh_ndx].sh_size) in xtensa_elf_relocate()
54 if (sh_ndx == ext->sect_cnt) { in xtensa_elf_relocate()
59 *got_entry += (uintptr_t)llext_loaded_sect_ptr(ldr, ext, sh_ndx) - in xtensa_elf_relocate()
60 ext->sect_hdrs[sh_ndx].sh_addr; in xtensa_elf_relocate()
76 int ret = llext_seek(ldr, ldr->sects[LLEXT_MEM_SYMTAB].sh_offset + in xtensa_elf_relocate()
77 ELF_R_SYM(rel->r_info) * sizeof(elf_sym_t)); in xtensa_elf_relocate()
88 * So far in all observed use-cases in xtensa_elf_relocate()
91 * by arch_elf_relocate_local() from its non-STT_SECTION branch. in xtensa_elf_relocate()
94 rsym.st_value + rel->r_addend; in xtensa_elf_relocate()
95 ssize_t value = (link_addr - (((uintptr_t)got_entry + 3) & ~3)) >> 2; in xtensa_elf_relocate()
99 /* L32R: low nibble is 1 */ in xtensa_elf_relocate()
103 /* CALLn: low nibble is 5 */ in xtensa_elf_relocate()
110 rel->r_info, rel->r_offset); in xtensa_elf_relocate()
135 int type = ELF32_R_TYPE(rel->r_info); in arch_elf_relocate_local()
138 if (ELF_ST_TYPE(sym->st_info) == STT_SECTION) { in arch_elf_relocate_local()
139 elf_shdr_t *shdr = ext->sect_hdrs + sym->st_shndx; in arch_elf_relocate_local()
141 /* shdr->sh_addr is NULL when not built for a specific address */ in arch_elf_relocate_local()
142 sh_addr = shdr->sh_addr && in arch_elf_relocate_local()
143 (!ldr_parm->section_detached || !ldr_parm->section_detached(shdr)) ? in arch_elf_relocate_local()
144 shdr->sh_addr : (uintptr_t)llext_loaded_sect_ptr(ldr, ext, sym->st_shndx); in arch_elf_relocate_local()
146 sh_addr = ldr->sects[LLEXT_MEM_TEXT].sh_addr; in arch_elf_relocate_local()
149 xtensa_elf_relocate(ldr, ext, rel, sh_addr, rel_addr, type, ELF_ST_BIND(sym->st_info)); in arch_elf_relocate_local()
158 int type = ELF32_R_TYPE(rel->r_info); in arch_elf_relocate_global()
160 /* For global relocations we expect the initial value for R_XTENSA_RELATIVE to be zero */ in arch_elf_relocate_global()
162 LOG_WRN("global: non-zero relative value %#x", *(elf_word *)rel_addr); in arch_elf_relocate_global()
166 ELF_ST_BIND(sym->st_info)); in arch_elf_relocate_global()