rtld i386: use macro for the 'GNU ABI' calling convention of TLS resolver

Discussed with:	jrtc27
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D59269
This commit is contained in:
Konstantin Belousov committed 2026-09-06 01:00:09 +03:00
1 parent 5d9e5f4964
commit fb63a60d6e
2 files changed
+5 -3

No files matched your search

+1 -2
View File
@@ -519,8 +519,7 @@ allocate_initial_tls(Obj_Entry *objs)
_tcb_set(tls);
}
/* GNU ABI */
__attribute__((__regparm__(1))) void *
__GNU_ABI void *
___tls_get_addr(tls_index *ti)
{
return (tls_get_addr_common(_tcb_get(), ti->ti_module, ti->ti_offset));
+4 -1
View File
@@ -78,7 +78,9 @@ typedef struct {
unsigned long ti_offset;
} tls_index;
void *___tls_get_addr(tls_index *ti) __attribute__((__regparm__(1))) __exported;
#define __GNU_ABI __attribute__((__regparm__(1)))
void *___tls_get_addr(tls_index *ti) __GNU_ABI __exported;
void *__tls_get_addr(tls_index *ti) __exported;
#define md_abi_variant_hook(x)
@@ -86,4 +88,5 @@ void *__tls_get_addr(tls_index *ti) __exported;
size_t calculate_first_tls_offset(size_t size, size_t align, size_t offset);
size_t calculate_tls_offset(size_t prev_offset, size_t prev_size, size_t size,
size_t align, size_t offset);
#endif