FreeBSD/libexec/rtld-elf/aarch64/reloc.c
/*
 * Look up the symbol to find its tls index
 */
Look up the symbol to find its tls index
Look up the symbol to find its tls index
static int64_t
rtld_tlsdesc_handle_locked(struct tls_data *tlsdesc, int flags,
    RtldLockState *lockstate)
{
	const Elf_Rela *rela;
	const Elf_Sym *def;
	const Obj_Entry *defobj;
	Obj_Entry *obj;
	rela = tlsdesc->rela;
	obj = tlsdesc->obj;
	def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, flags, NULL,
	    lockstate);
	if (def == NULL)
		rtld_die();
	tlsdesc->index = defobj->tlsoffset + def->st_value + rela->r_addend;
	return (tlsdesc->index);
}
static int64_t rtld_tlsdesc_handle_locked ( struct tls_data * tlsdesc , int flags , RtldLockState * lockstate ) { const Elf_Rela * rela ; const Elf_Sym * def ; const Obj_Entry * defobj ; Obj_Entry * obj ; rela = tlsdesc -> rela ; obj = tlsdesc -> obj ; def = find_symdef ( ELF_R_SYM ( rela -> r_info ) , obj , & defobj , flags , NULL , lockstate ) ; if ( def == NULL ) rtld_die ( ) ; tlsdesc -> index = defobj -> tlsoffset + def -> st_value + rela -> r_addend ; return ( tlsdesc -> index ) ; }
Look up the symbol to find its tls index
Look up the symbol to find its tls index