git: 04fcc0f629e5 - stable/15 - rtld i386: use macro for the 'GNU ABI' calling convention of TLS resolver
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 12 Sep 2026 00:28:06 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=04fcc0f629e569427eaf6900f107dfb235e91e18
commit 04fcc0f629e569427eaf6900f107dfb235e91e18
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-08-25 12:31:53 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-09-11 06:59:53 +0000
rtld i386: use macro for the 'GNU ABI' calling convention of TLS resolver
(cherry picked from commit fb63a60d6e15d022dee453363dbaf647cbc2a507)
---
libexec/rtld-elf/i386/reloc.c | 3 +--
libexec/rtld-elf/i386/rtld_machdep.h | 5 ++++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c
index 845735deac7d..060b3cb147e3 100644
--- a/libexec/rtld-elf/i386/reloc.c
+++ b/libexec/rtld-elf/i386/reloc.c
@@ -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));
diff --git a/libexec/rtld-elf/i386/rtld_machdep.h b/libexec/rtld-elf/i386/rtld_machdep.h
index 7eb7b1cdfb77..574eafe432db 100644
--- a/libexec/rtld-elf/i386/rtld_machdep.h
+++ b/libexec/rtld-elf/i386/rtld_machdep.h
@@ -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