mips: Rename TLS_DTP_OFFSET to TLS_DTV_OFFSET.

This is the more standard name for the bias of dtv pointers used on
other platforms.  This also fixes a few other places that were using
the wrong bias previously on MIPS such as dlpi_tls_data in struct
dl_phdr_info and the recently added __libc_tls_get_addr().

Reviewed by:	kib, jrtc27
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33346
This commit is contained in:
John Baldwin 2021-12-09 13:16:00 -08:00
parent 5d8176337e
commit 03f6b14106
3 changed files with 3 additions and 4 deletions

View file

@ -591,7 +591,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags,
if (!defobj->tls_done && !allocate_tls_offset(obj))
return -1;
val += (Elf_Addr)def->st_value - TLS_DTP_OFFSET;
val += (Elf_Addr)def->st_value - TLS_DTV_OFFSET;
store_ptr(where, val, rlen);
dbg("DTPREL %s in %s %p --> %p in %s",
@ -784,7 +784,7 @@ __tls_get_addr(tls_index* ti)
tls = _get_tp();
p = tls_get_addr_common(tls, ti->ti_module, ti->ti_offset +
TLS_DTP_OFFSET);
TLS_DTV_OFFSET);
return (p);
}

View file

@ -78,6 +78,5 @@ extern void *__tls_get_addr(tls_index *ti);
#define md_abi_variant_hook(x)
#define TLS_VARIANT_I 1
#define TLS_DTV_OFFSET 0
#endif

View file

@ -39,7 +39,7 @@
*/
#define TLS_TP_OFFSET 0x7000
#define TLS_DTP_OFFSET 0x8000
#define TLS_DTV_OFFSET 0x8000
#ifdef __mips_n64
#define TLS_TCB_SIZE 16