git: 7c6a5272f1de - main - libthr.so: mark as -z initfirst

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 06 May 2025 17:15:09 UTC
The branch main has been updated by kib:

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

commit 7c6a5272f1ded20e91b63fe3d1a016243641a37d
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-05-03 08:15:36 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-05-06 17:14:56 +0000

    libthr.so: mark as -z initfirst
    
    PR:     286537
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D50133
---
 lib/libthr/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile
index 19afa93f12be..c87be9475390 100644
--- a/lib/libthr/Makefile
+++ b/lib/libthr/Makefile
@@ -53,6 +53,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND
 .endif
 
 LDFLAGS+=-Wl,-znodelete
+LDFLAGS+=-Wl,-zinitfirst
 LDFLAGS+=-Wl,--auxiliary,libsys.so.7
 
 VERSION_DEF=${SRCTOP}/lib/libc/Versions.def