diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-11-03 17:28:03 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-11-03 17:28:03 +0100 |
commit | 1f34a2328890aa192141f96449d25b77f666bf47 (patch) | |
tree | 283ca2a4b46cf069da45f40663e779003064bcdc /sysdeps/mach/hurd | |
parent | fb6ee7ba8122330ac819556a42cc56db07d9da76 (diff) | |
download | glibc-1f34a2328890aa192141f96449d25b77f666bf47.tar.gz glibc-1f34a2328890aa192141f96449d25b77f666bf47.tar.xz glibc-1f34a2328890aa192141f96449d25b77f666bf47.zip |
elf: Introduce <dl-call_tls_init_tp.h> and call_tls_init_tp (bug 29249)
This makes it more likely that the compiler can compute the strlen argument in _startup_fatal at compile time, which is required to avoid a dependency on strlen this early during process startup. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Diffstat (limited to 'sysdeps/mach/hurd')
-rw-r--r-- | sysdeps/mach/hurd/i386/tls.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h index 602bacc0de..2847e3ee61 100644 --- a/sysdeps/mach/hurd/i386/tls.h +++ b/sysdeps/mach/hurd/i386/tls.h @@ -117,12 +117,12 @@ extern unsigned short __init1_desc; # define HURD_SEL_LDT(sel) (__builtin_expect ((sel) & 4, 0)) -static inline const char * __attribute__ ((unused)) +static inline bool __attribute__ ((unused)) _hurd_tls_init (tcbhead_t *tcb) { HURD_TLS_DESC_DECL (desc, tcb); thread_t self = __mach_thread_self (); - const char *msg = NULL; + bool success = true; /* This field is used by TLS accesses to get our "thread pointer" from the TLS point of view. */ @@ -141,14 +141,14 @@ _hurd_tls_init (tcbhead_t *tcb) assert_perror (err); if (err) { - msg = "i386_set_ldt failed"; + success = false; goto out; } } else if (err) { assert_perror (err); /* Separate from above with different line #. */ - msg = "i386_set_gdt failed"; + success = false; goto out; } @@ -157,7 +157,7 @@ _hurd_tls_init (tcbhead_t *tcb) out: __mach_port_deallocate (__mach_task_self (), self); - return msg; + return success; } /* Code to initially initialize the thread pointer. This might need |