git: eb8cf785e441 - stable/14 - libthr.so: mark as -z initfirst

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Sat, 10 May 2025 19:33:13 UTC
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=eb8cf785e4416fd74fe082218328453d1913a812

commit eb8cf785e4416fd74fe082218328453d1913a812
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-05-03 08:15:36 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-05-10 18:57:46 +0000

    libthr.so: mark as -z initfirst
    
    PR:     286537
    
    (cherry picked from commit 7c6a5272f1ded20e91b63fe3d1a016243641a37d)
---
 lib/libthr/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile
index 2f20934bb351..612ebf3c28ec 100644
--- a/lib/libthr/Makefile
+++ b/lib/libthr/Makefile
@@ -39,6 +39,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND
 .endif
 
 LDFLAGS+=-Wl,-znodelete
+LDFLAGS+=-Wl,-zinitfirst
 
 VERSION_DEF=${SRCTOP}/lib/libc/Versions.def
 SYMBOL_MAPS=${.CURDIR}/pthread.map