From nobody Sun Jun 11 23:40:20 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QfWX5276Jz4cLMb; Sun, 11 Jun 2023 23:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QfWX51Wdnz438s; Sun, 11 Jun 2023 23:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686526821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bfTyMwhol4lX0L5dnIKNigE1nWDIB6vUM4ykE9fNOJ4=; b=mWEIBzGDXFOPScwK9Qa6cHT8BZrF49dn4zRXaVWzAwD/9b5rZTR8VybN50ro7s8Ra9+FKq x/RkCOzx3JAK78m3xvMvrBCVUMJ1Zrmaqwc0RNGQoIQSrvWeP2i2RW0WS2Ox1ImHU30nt5 hl0EMODvs+4joX2IK08KdkPBEcPleFJqW7yQ8b1y849WbQTLEn0nGP1W63Lz0ASh4G6LGH D5BjBmoz5PM7Otbw8M6S6xzWkQPbtBOZ7pGrGZjcSRWYtr2NbOuRRN1Oa0C0qX4jabSiF8 FY3Arga+eq8hzuY6EGdXPAzjwl0u2ovoXiBvHP7sXLNw6HOqquPc775GAqW7TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686526821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bfTyMwhol4lX0L5dnIKNigE1nWDIB6vUM4ykE9fNOJ4=; b=SYNXjdlmzAdiA5wHLmoRXjPmH3voRqINi9b+z5RXjcb8QxWI2Dqq1vL/e0lDF/Z9HWy6v8 1XeXeUNzww7jW9dPC5v9vXxrSWHTPX2pYkMxbEvBaTJ8keGZcqdjpEN8pZar/togHoQkrf xJdKE+7jWWS1Yeh6TS35UtZUuvBETdFQNFjyVNDh+PxVIBR+3Ndb7HDdBsBo99V6Z2k3ZO Y9Zt23RTi2pqZP7aSZBEVIedem/filOng+lxtgYhBUoQ0Su/cUuD9T3uyrQEIsRHg+Wy0u tprHeeIawTPGstqkFe9dskpgQWvka+wogAhfYBWklI4/d4i7k7KRXRDDotkP/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686526821; a=rsa-sha256; cv=none; b=ayNPtSatulgBqC4kFyK+LPUTnb+rb6K0ixPw0dU6Gm2OyRfilDI4FenxeuFwv9yS/sBGAX PUU/IBnyjgwU3jlRaVaI+sGSr8N89JBbbIp1xucl90DezAVcfqdrvEZa6p+qAJE+v1+aZJ X/nZfVHYQMdZCTNBZnHBdm7YfZCjrP/Z7nD81Y66fxdDj2bLfSBDb0OyvIoP+px+nRgWA2 U8a9r0txXlxHDFxque4+HFrsPAfxPf2mwAADqbF6P07HtR0vSRiBA5NcxGeXFtTEoPf2BX rEGCtCTELmKLXJreZ0JviOLT92LOL5m04tBmzw/ra5th5RA4SP8sufxwMdJh3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QfWX45sgSzHgZ; Sun, 11 Jun 2023 23:40:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35BNeK0W087813; Sun, 11 Jun 2023 23:40:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35BNeKX4087812; Sun, 11 Jun 2023 23:40:20 GMT (envelope-from git) Date: Sun, 11 Jun 2023 23:40:20 GMT Message-Id: <202306112340.35BNeKX4087812@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 60e3db0c4527 - stable/13 - rtld: rename tls_done to tls_static List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 60e3db0c45273bfdcd0afd88138ccd32ef0049d9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=60e3db0c45273bfdcd0afd88138ccd32ef0049d9 commit 60e3db0c45273bfdcd0afd88138ccd32ef0049d9 Author: Konstantin Belousov AuthorDate: 2023-06-05 00:43:55 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-11 23:39:43 +0000 rtld: rename tls_done to tls_static (cherry picked from commit 283a4f409731ba3a4eb1be41e151c20e8a960c03) --- libexec/rtld-elf/aarch64/reloc.c | 2 +- libexec/rtld-elf/amd64/reloc.c | 4 ++-- libexec/rtld-elf/arm/reloc.c | 2 +- libexec/rtld-elf/i386/reloc.c | 2 +- libexec/rtld-elf/map_object.c | 2 +- libexec/rtld-elf/mips/reloc.c | 4 ++-- libexec/rtld-elf/powerpc/reloc.c | 2 +- libexec/rtld-elf/powerpc64/reloc.c | 2 +- libexec/rtld-elf/riscv/reloc.c | 4 ++-- libexec/rtld-elf/rtld.c | 8 ++++---- libexec/rtld-elf/rtld.h | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c index d83da4df0ec5..f9a1ae4c2b6c 100644 --- a/libexec/rtld-elf/aarch64/reloc.c +++ b/libexec/rtld-elf/aarch64/reloc.c @@ -470,7 +470,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error( diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index c9a2734853b6..e1e24bc462d6 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -258,7 +258,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * dynamically loaded modules. If we run out * of space, we generate an error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available " @@ -279,7 +279,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * dynamically loaded modules. If we run out * of space, we generate an error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available " diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index c3219d52bf7e..9f39a315a4e7 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -319,7 +319,7 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, if (def == NULL) return -1; - if (!defobj->tls_done && !allocate_tls_offset(obj)) + if (!defobj->tls_static && !allocate_tls_offset(obj)) return -1; tmp = (Elf_Addr)def->st_value + defobj->tlsoffset; diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c index b9c16e2cd154..f7123f91f6fb 100644 --- a/libexec/rtld-elf/i386/reloc.c +++ b/libexec/rtld-elf/i386/reloc.c @@ -242,7 +242,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * dynamically loaded modules. If we run out * of space, we generate an error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available " diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index fb5854910ee2..149b8945bf35 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -433,7 +433,7 @@ obj_free(Obj_Entry *obj) { Objlist_Entry *elm; - if (obj->tls_done) + if (obj->tls_static) free_tls_offset(obj); while (obj->needed != NULL) { Needed_Entry *needed = obj->needed; diff --git a/libexec/rtld-elf/mips/reloc.c b/libexec/rtld-elf/mips/reloc.c index 12bfb01ba4ad..6867e9e1553c 100644 --- a/libexec/rtld-elf/mips/reloc.c +++ b/libexec/rtld-elf/mips/reloc.c @@ -588,7 +588,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, if (def == NULL) return -1; - if (!defobj->tls_done && !allocate_tls_offset(obj)) + if (!defobj->tls_static && !allocate_tls_offset(obj)) return -1; val += (Elf_Addr)def->st_value - TLS_DTV_OFFSET; @@ -616,7 +616,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, if (def == NULL) return -1; - if (!defobj->tls_done && !allocate_tls_offset(obj)) + if (!defobj->tls_static && !allocate_tls_offset(obj)) return -1; val += (Elf_Addr)(def->st_value + defobj->tlsoffset diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index ab09b1536d80..56985ef51d8d 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -252,7 +252,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld __unused, Obj_Entry *obj, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available for static " diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 1dcdd2478403..93907ebd97d3 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -247,7 +247,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld __unused, Obj_Entry *obj, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available for static " diff --git a/libexec/rtld-elf/riscv/reloc.c b/libexec/rtld-elf/riscv/reloc.c index 48d513b94ec6..b5dea298b74d 100644 --- a/libexec/rtld-elf/riscv/reloc.c +++ b/libexec/rtld-elf/riscv/reloc.c @@ -325,7 +325,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error( @@ -352,7 +352,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error( diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index dc8353ba6628..8aa717021c97 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5520,11 +5520,11 @@ allocate_tls_offset(Obj_Entry *obj) { size_t off; - if (obj->tls_done) + if (obj->tls_static) return (true); if (obj->tlssize == 0) { - obj->tls_done = true; + obj->tls_static = true; return (true); } @@ -5555,7 +5555,7 @@ allocate_tls_offset(Obj_Entry *obj) tls_last_offset = off; tls_last_size = obj->tlssize; - obj->tls_done = true; + obj->tls_static = true; return (true); } @@ -5931,7 +5931,7 @@ distribute_static_tls(Objlist *list, RtldLockState *lockstate) return; STAILQ_FOREACH(elm, list, link) { obj = elm->obj; - if (obj->marker || !obj->tls_done || obj->static_tls_copied) + if (obj->marker || !obj->tls_static || obj->static_tls_copied) continue; distrib(obj->tlsoffset, obj->tlsinit, obj->tlsinitsize, obj->tlssize); diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index e8e997753c6f..7db3f00e0dc5 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -251,7 +251,7 @@ typedef struct Struct_Obj_Entry { bool traced : 1; /* Already printed in ldd trace output */ bool jmpslots_done : 1; /* Already have relocated the jump slots */ bool init_done : 1; /* Already have added object to init list */ - bool tls_done : 1; /* Already allocated offset for static TLS */ + bool tls_static : 1; /* Already allocated offset for static TLS */ bool phdr_alloc : 1; /* Phdr is allocated and needs to be freed. */ bool z_origin : 1; /* Process rpath and soname tokens */ bool z_nodelete : 1; /* Do not unload the object and dependencies */