/freebsd/libexec/rtld-elf/powerpc64/ |
H A D | reloc.c | 49 Elf_Addr addr; 50 Elf_Addr toc; 51 Elf_Addr env; 59 obj->glink = (Elf_Addr)(obj->relocbase + dynp->d_un.d_ptr); in arch_digest_dynamic() 135 reloc_non_plt_self(Elf_Dyn *dynp, Elf_Addr relocbase) in reloc_non_plt_self() 138 Elf_Addr relasz = 0; in reloc_non_plt_self() 139 Elf_Addr *where; in reloc_non_plt_self() 160 where = (Elf_Addr *)(relocbase + rela->r_offset); in reloc_non_plt_self() 161 *where = (Elf_Addr)(relocbase + rela->r_addend); in reloc_non_plt_self() 175 Elf_Addr *where, symval = 0; in reloc_nonplt_object() [all …]
|
/freebsd/lib/libc/gen/ |
H A D | tls.c | 202 Elf_Addr *dtv; in __libc_free_tls() 203 Elf_Addr **tls; in __libc_free_tls() 205 tls = (Elf_Addr **)tcb; in __libc_free_tls() 234 Elf_Addr *dtv, **tcb; in __libc_allocate_tls() 263 tcb = (Elf_Addr **)(tls_block + pre_size + extra_size); in __libc_allocate_tls() 273 dtv[2] = (Elf_Addr)(tls + TLS_DTV_OFFSET); in __libc_allocate_tls() 275 dtv = __je_bootstrap_malloc(3 * sizeof(Elf_Addr)); in __libc_allocate_tls() 284 dtv[2] = (Elf_Addr)(tls + TLS_DTV_OFFSET); in __libc_allocate_tls() 304 Elf_Addr* dtv; in __libc_free_tls() 305 Elf_Addr tlsstart, tlsend; in __libc_free_tls() [all …]
|
/freebsd/libexec/rtld-elf/arm/ |
H A D | reloc.c | 23 obj->pltgot[1] = (Elf_Addr) obj; in init_pltgot() 24 obj->pltgot[2] = (Elf_Addr) &_rtld_bind_start; in init_pltgot() 84 void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); 87 _rtld_relocate_nonplt_self(Elf_Dyn *dynp, Elf_Addr relocbase) in _rtld_relocate_nonplt_self() 90 Elf_Addr relsz = 0; in _rtld_relocate_nonplt_self() 91 Elf_Addr *where; in _rtld_relocate_nonplt_self() 105 where = (Elf_Addr *)(relocbase + rel->r_offset); in _rtld_relocate_nonplt_self() 107 *where += (Elf_Addr)relocbase; in _rtld_relocate_nonplt_self() 117 static __inline Elf_Addr 120 Elf_Addr res; in load_ptr() [all …]
|
/freebsd/libexec/rtld-elf/powerpc/ |
H A D | reloc.c | 64 obj->gotptr = (Elf_Addr *)(obj->relocbase + dynp->d_un.d_ptr); in arch_digest_dynamic() 140 reloc_non_plt_self(Elf_Dyn *dynp, Elf_Addr relocbase) in reloc_non_plt_self() 143 Elf_Addr relasz = 0; in reloc_non_plt_self() 144 Elf_Addr *where; in reloc_non_plt_self() 165 where = (Elf_Addr *)(relocbase + rela->r_offset); in reloc_non_plt_self() 166 *where = (Elf_Addr)(relocbase + rela->r_addend); in reloc_non_plt_self() 180 Elf_Addr *where, symval = 0; in reloc_nonplt_object() 220 symval = (Elf_Addr)rtld_resolve_ifunc( in reloc_nonplt_object() 231 symval = (Elf_Addr)defobj->relocbase + in reloc_nonplt_object() 239 where = (Elf_Addr *)(obj->relocbase + rela->r_offset); in reloc_nonplt_object() [all …]
|
/freebsd/libexec/rtld-elf/amd64/ |
H A D | reloc.c | 120 obj->pltgot[1] = (Elf_Addr) obj; in init_pltgot() 121 obj->pltgot[2] = (Elf_Addr) &_rtld_bind_start; in init_pltgot() 135 Elf_Addr *where, symval; in reloc_non_plt() 191 symval = (Elf_Addr)rtld_resolve_ifunc( in reloc_non_plt() 206 symval = (Elf_Addr)defobj->relocbase + in reloc_non_plt() 215 where = (Elf_Addr *)(obj->relocbase + rela->r_offset); in reloc_non_plt() 231 rela->r_addend - (Elf_Addr)where); in reloc_non_plt() 268 *where = (Elf_Addr)(def->st_value - defobj->tlsoffset + in reloc_non_plt() 293 *where += (Elf_Addr)defobj->tlsindex; in reloc_non_plt() 296 *where += (Elf_Addr)(def->st_value + rela->r_addend); in reloc_non_plt() [all …]
|
/freebsd/libexec/rtld-elf/riscv/ |
H A D | reloc.c | 78 obj->pltgot[0] = (Elf_Addr)&_rtld_bind_start; in init_pltgot() 79 obj->pltgot[1] = (Elf_Addr)obj; in init_pltgot() 153 Elf_Addr *where; in reloc_plt() 155 where = (Elf_Addr *)(obj->relocbase + rela->r_offset); in reloc_plt() 159 *where += (Elf_Addr)obj->relocbase; in reloc_plt() 188 Elf_Addr *where; in reloc_jmpslots() 190 where = (Elf_Addr *)(obj->relocbase + rela->r_offset); in reloc_jmpslots() 205 *where = (Elf_Addr)(defobj->relocbase + def->st_value); in reloc_jmpslots() 221 Elf_Addr *where, target, *ptr; in reloc_iresolve_one() 223 ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend); in reloc_iresolve_one() [all …]
|
H A D | rtld_machdep.h | 52 Elf_Addr _dynamic_addr; \ 63 Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, 88 (((Elf_Addr (*)(unsigned long, unsigned long, unsigned long, \
|
/freebsd/libexec/rtld-elf/aarch64/ |
H A D | reloc.c | 117 obj->pltgot[1] = (Elf_Addr) obj; in init_pltgot() 118 obj->pltgot[2] = (Elf_Addr) &_rtld_bind_start; in init_pltgot() 180 Elf_Addr dtv_gen; 182 Elf_Addr tls_offs; 186 reloc_tlsdesc_alloc(int tlsindex, Elf_Addr tlsoffs) in reloc_tlsdesc_alloc() 213 Elf_Addr offs; in reloc_tlsdesc() 258 Elf_Addr *where, target; in reloc_plt() 260 where = (Elf_Addr *)(obj->relocbase + rela->r_offset); in reloc_plt() 278 *where += (Elf_Addr)obj->relocbase; in reloc_plt() 289 target = (Elf_Addr)(defobj->relocbase + in reloc_plt() [all …]
|
/freebsd/libexec/rtld-elf/i386/ |
H A D | reloc.c | 118 obj->pltgot[1] = (Elf_Addr) obj; in init_pltgot() 119 obj->pltgot[2] = (Elf_Addr) &_rtld_bind_start; in init_pltgot() 133 Elf_Addr *where, symval, add; in reloc_non_plt() 174 symval = (Elf_Addr)rtld_resolve_ifunc( in reloc_non_plt() 188 symval = (Elf_Addr)defobj->relocbase + in reloc_non_plt() 197 where = (Elf_Addr *)(obj->relocbase + rel->r_offset); in reloc_non_plt() 211 *where += symval - (Elf_Addr)where; in reloc_non_plt() 231 *where += (Elf_Addr)obj->relocbase; in reloc_non_plt() 252 add = (Elf_Addr)(def->st_value - defobj->tlsoffset); in reloc_non_plt() 259 *where += (Elf_Addr)defobj->tlsindex; in reloc_non_plt() [all …]
|
/freebsd/sys/arm/arm/ |
H A D | elf_machdep.c | 161 static __inline Elf_Addr 162 load_ptr(Elf_Addr *where) in load_ptr() 164 Elf_Addr res; in load_ptr() 173 store_ptr(Elf_Addr *where, Elf_Addr val) in store_ptr() 184 elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, in elf_reloc_internal() 187 Elf_Addr *where; in elf_reloc_internal() 188 Elf_Addr addr; in elf_reloc_internal() 189 Elf_Addr addend; in elf_reloc_internal() 198 where = (Elf_Addr *) (relocbase + rel->r_offset); in elf_reloc_internal() 205 where = (Elf_Addr *) (relocbase + rela->r_offset); in elf_reloc_internal() [all …]
|
/freebsd/sys/powerpc/powerpc/ |
H A D | elf32_machdep.c | 178 void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase); 236 elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, in elf_reloc_internal() 239 Elf_Addr *where; in elf_reloc_internal() 241 Elf_Addr addr; in elf_reloc_internal() 242 Elf_Addr addend, val; in elf_reloc_internal() 253 where = (Elf_Addr *) ((uintptr_t)relocbase + rela->r_offset); in elf_reloc_internal() 339 elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase) in elf_reloc_self() 342 Elf_Addr relasz = 0; in elf_reloc_self() 343 Elf_Addr *where; in elf_reloc_self() 366 where = (Elf_Addr *)(relocbase + rela->r_offset); in elf_reloc_self() [all …]
|
H A D | elf64_machdep.c | 201 void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase); 324 elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, in elf_reloc_internal() 327 Elf_Addr *where; in elf_reloc_internal() 328 Elf_Addr addr; in elf_reloc_internal() 329 Elf_Addr addend, val; in elf_reloc_internal() 340 where = (Elf_Addr *) (relocbase + rela->r_offset); in elf_reloc_internal() 368 memcpy(where, (Elf_Addr *)addr, 3*sizeof(Elf_Addr)); in elf_reloc_internal() 391 elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase) in elf_reloc_self() 394 Elf_Addr relasz = 0; in elf_reloc_self() 395 Elf_Addr *where; in elf_reloc_self() [all …]
|
/freebsd/stand/common/ |
H A D | reloc_elf.c | 49 int reltype, Elf_Addr relbase, Elf_Addr dataaddr, void *data, size_t len) in __elfN() 54 Elf_Addr addend, addr; in __elfN() 65 where = (Elf_Addr *)((char *)data + relbase + rel->r_offset - in __elfN() 76 where = (Elf_Addr *)((char *)data + relbase + rela->r_offset - in __elfN() 109 addr = (Elf_Addr)addend + relbase; in __elfN() 132 Elf_Addr addend, addr, *where, val; in __elfN() 140 where = (Elf_Addr *)((char *)data + relbase + rel->r_offset - in __elfN() 149 where = (Elf_Addr *)((char *)data + relbase + rela->r_offset - in __elfN()
|
H A D | load_elf_obj.c | 73 const char *name, Elf_Addr *startp, Elf_Addr *stopp, int *countp); 75 Elf_Addr p, void *val, size_t len); 78 static Elf_Addr __elfN(obj_symaddr)(struct elf_file *ef, Elf_Size symidx); 269 shdr[i].sh_addr = (Elf_Addr)lastaddr; in __elfN() 291 shdr[ef->symtabindex].sh_addr = (Elf_Addr)lastaddr; in __elfN() 302 shdr[symstrindex].sh_addr = (Elf_Addr)lastaddr; in __elfN() 314 shdr[ef->shstrindex].sh_addr = (Elf_Addr)lastaddr; in __elfN() 325 shdr[i].sh_addr = (Elf_Addr)lastaddr; in __elfN() 407 Elf_Addr v, p, p_stop; in __elfN() 434 p += sizeof(Elf_Addr); in __elfN() [all …]
|
H A D | self_reloc.c | 60 void self_reloc(Elf_Addr baseaddr, ElfW_Dyn *dynamic); 66 self_reloc(Elf_Addr baseaddr, ElfW_Dyn *dynamic) in self_reloc() 69 Elf_Addr *newaddr; in self_reloc() 109 newaddr = (Elf_Addr *)(rel->r_offset + baseaddr); in self_reloc()
|
/freebsd/sys/i386/i386/ |
H A D | elf_machdep.c | 173 elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, in elf_reloc_internal() 176 Elf_Addr *where; in elf_reloc_internal() 177 Elf_Addr addr; in elf_reloc_internal() 178 Elf_Addr addend; in elf_reloc_internal() 187 where = (Elf_Addr *) (relocbase + rel->r_offset); in elf_reloc_internal() 194 where = (Elf_Addr *) (relocbase + rela->r_offset); in elf_reloc_internal() 229 addr += addend - (Elf_Addr)where; in elf_reloc_internal() 258 addr = ((Elf_Addr (*)(void))addr)(); in elf_reloc_internal() 272 elf_reloc(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, in elf_reloc() 280 elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, in elf_reloc_local()
|
/freebsd/libexec/rtld-elf/ |
H A D | rtld.h | 51 extern Elf_Addr tls_dtv_generation; 150 Elf_Addr vaddrbase; /* Base address in shared object file */ 172 Elf_Addr *pltgot; /* PLT or GOT, depending on architecture */ 203 const Elf_Addr *bloom_gnu; /* Bloom filter used by GNU hash func */ 218 Elf_Addr init; /* Initialization function to call */ 219 Elf_Addr fini; /* Termination function to call */ 220 Elf_Addr preinit_array; /* Pre-initialization array of functions */ 221 Elf_Addr init_array; /* Initialization array of functions */ 222 Elf_Addr fini_array; /* Termination array of functions */ 390 extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; [all …]
|
H A D | map_object.c | 77 Elf_Addr base_vaddr; in map_object() 78 Elf_Addr base_vlimit; in map_object() 82 Elf_Addr data_vaddr; in map_object() 83 Elf_Addr data_vlimit; in map_object() 87 Elf_Addr clear_vaddr; in map_object() 90 Elf_Addr phdr_vaddr; in map_object() 92 Elf_Addr bss_vaddr; in map_object() 93 Elf_Addr bss_vlimit; in map_object() 96 Elf_Addr relro_page; in map_object() 98 Elf_Addr note_start; in map_object() [all …]
|
/freebsd/sys/arm64/arm64/ |
H A D | elf_machdep.c | 161 reloc_instr_imm(Elf32_Addr *where, Elf_Addr val, u_int msb, u_int lsb) in reloc_instr_imm() 178 elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, in elf_reloc_internal() 183 Elf_Addr *where, addr, addend, val; in elf_reloc_internal() 192 where = (Elf_Addr *) (relocbase + rel->r_offset); in elf_reloc_internal() 199 where = (Elf_Addr *) (relocbase + rela->r_offset); in elf_reloc_internal() 231 addr + addend - (Elf_Addr)where, 15, 2); in elf_reloc_internal() 238 addr + addend - (Elf_Addr)where, 20, 2); in elf_reloc_internal() 246 addr + addend - (Elf_Addr)where, 27, 2); in elf_reloc_internal() 271 elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, in elf_reloc_local() 281 elf_reloc(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, in elf_reloc() [all …]
|
/freebsd/lib/libc/csu/aarch64/ |
H A D | reloc.c | 37 typedef Elf_Addr (*ifunc_resolver_t)( in crt1_handle_rela() 40 Elf_Addr *ptr, *where, target; in crt1_handle_rela() 44 ptr = (Elf_Addr *)r->r_addend; in crt1_handle_rela() 45 where = (Elf_Addr *)r->r_offset; in crt1_handle_rela()
|
/freebsd/lib/libc/csu/riscv/ |
H A D | reloc.c | 42 typedef Elf_Addr (*ifunc_resolver_t)( in crt1_handle_rela() 45 Elf_Addr *ptr, *where, target; in crt1_handle_rela() 49 ptr = (Elf_Addr *)r->r_addend; in crt1_handle_rela() 50 where = (Elf_Addr *)r->r_offset; in crt1_handle_rela()
|
/freebsd/lib/libc/csu/powerpc64/ |
H A D | reloc.c | 45 typedef Elf_Addr (*ifunc_resolver_t)( in crt1_handle_rela() 48 Elf_Addr *ptr, *where, target; in crt1_handle_rela() 52 ptr = (Elf_Addr *)r->r_addend; in crt1_handle_rela() 53 where = (Elf_Addr *)r->r_offset; in crt1_handle_rela()
|
/freebsd/lib/libc/csu/amd64/ |
H A D | reloc.c | 56 Elf_Addr *ptr, *where, target; in crt1_handle_rela() 60 ptr = (Elf_Addr *)r->r_addend; in crt1_handle_rela() 61 where = (Elf_Addr *)r->r_offset; in crt1_handle_rela() 62 target = ((Elf_Addr (*)(uint32_t, uint32_t, uint32_t, in crt1_handle_rela()
|
/freebsd/sys/riscv/riscv/ |
H A D | elf_machdep.c | 290 elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, in elf_reloc_internal() 295 Elf_Addr val, addr; in elf_reloc_internal() 297 Elf_Addr addend; in elf_reloc_internal() 308 where = (Elf_Addr *)(relocbase + rela->r_offset); in elf_reloc_internal() 364 val = addr - (Elf_Addr)where; in elf_reloc_internal() 391 val = addr - (Elf_Addr)where; in elf_reloc_internal() 416 val = addr - (Elf_Addr)where; in elf_reloc_internal() 432 val = addr - (Elf_Addr)where; in elf_reloc_internal() 447 val = addr - (Elf_Addr)where; in elf_reloc_internal() 515 elf_reloc(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, in elf_reloc() [all …]
|
/freebsd/sys/kern/ |
H A D | link_elf.c | 93 Elf_Addr *got; /* DT_PLTGOT */ 114 Elf_Addr pcpu_start; /* Pre-relocation pcpu set start. */ 115 Elf_Addr pcpu_stop; /* Pre-relocation pcpu set stop. */ 116 Elf_Addr pcpu_base; /* Relocated pcpu set address. */ 118 Elf_Addr vnet_start; /* Pre-relocation vnet set start. */ 119 Elf_Addr vnet_stop; /* Pre-relocation vnet set stop. */ 120 Elf_Addr vnet_base; /* Relocated vnet set address. */ 128 Elf_Addr es_start; 129 Elf_Addr es_stop; 130 Elf_Addr es_base; [all …]
|