refactor: drop the bfd TLS workaround, binutils uses real TLS now
With the TLS runtime landed (PT_TLS loading + per-thread FS base) and tls-test.elf passing on the OS, the sysdep.h hunk that degraded BFD's _Thread_local error state to plain globals is no longer needed. Native binutils is rebuilt with genuine thread-locals: the shipped tools now carry a PT_TLS segment and %fs-relative accesses, exercising the new runtime in every invocation. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
@@ -45,21 +45,3 @@
|
|||||||
x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
|
x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
|
||||||
targ_emul=elf_x86_64
|
targ_emul=elf_x86_64
|
||||||
targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64"
|
targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64"
|
||||||
--- a/bfd/sysdep.h
|
|
||||||
+++ b/bfd/sysdep.h
|
|
||||||
@@ -27,6 +27,15 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
+
|
|
||||||
+/* MontaukOS provides no runtime TLS yet (no FS-base setup, no PT_TLS
|
|
||||||
+ handling in the ELF loader), so a _Thread_local access traps at
|
|
||||||
+ %fs:0. Degrade BFD's thread-local error state to plain globals;
|
|
||||||
+ the native tools are single-threaded. */
|
|
||||||
+#ifdef __montauk__
|
|
||||||
+#undef TLS
|
|
||||||
+#define TLS
|
|
||||||
+#endif
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
|
||||||
|
|||||||
Reference in New Issue
Block a user