From nobody Mon Jul 15 12:38:17 2024 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 4WN1vY4s71z5Qrn6; Mon, 15 Jul 2024 12:38:17 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN1vY2mhkz4HS2; Mon, 15 Jul 2024 12:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047097; 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=oUtMdw4J3XrqGX7CxXYRPQIDJGXUzZtD1vKBM7C2+EY=; b=cvFPHhwVT3nne2DRcUvFMQN6PEKWjss6+MfKj3foMGdjJgFEHIL/H6aFQA05tdgQ/8MqPI 1/A8xI78lFOU+4YE+m/ZaZo1EVYXzCDkNzbcIR7h/0Ktp5KvrRTCCj6E2k1MY3H/S7treT HOSITsxLVr9Z5m3Lm7KufuXg83k62eM8crf4QxxAEi/xeOf+W8LaqKDXnr+1M/BwX1OAsV iJi47jpZaUzLTslI49kxkrixhg0W129BCswAhTc09tA1y8zbYTY4t0afeIngIVmv3TVydo O+ox9spRDtSSZ+M6+nYl9OmUOjhlYaimFQBuN3g7opw8f/Yr4VyNbaOeOuX+oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047097; a=rsa-sha256; cv=none; b=gmnZSGxqjIR3OQHJR0DKI+1kvVdaL88RHCzJ7PKzswxiQcol5F7c+Yl0gdKKvQVTkH3zdp QeqSL/gem9d2iwG3FLiWSZP9TVk9Nqxj7rgwF9BZJleGJXgIPLLr0J6x9YXYPuPNi5QtlD BJ4C53ZrYWW4mBsYMnFGW2T1oWWsWTfKns8c23R8T7zX0mhuB0H6Wf2l3E8SZbTuxa3msz iBAEaxVliR2N9zwZPFqhJHHV0OHIr8e/16/D0WmX60no2qUZFGHkn/Y55zrxwXiQfz3SXT rEevpBHTePGoZ3zOp1HPvQCPPXdFe+Fk2+W9id+WXs5zquCxTbmpnfUPm3ohHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047097; 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=oUtMdw4J3XrqGX7CxXYRPQIDJGXUzZtD1vKBM7C2+EY=; b=GF+P5jARqtjeT+JWVdhefaFIJFBLmpvQjgK/PpyAurWu0qQYLAvYXG8MQy/5EzuawLllIb 9viI395bROy69oLZhh8qy5QzbYl0Ov+QUO/G0eD2NPkfYMhCMsjcJYWZUmsQTgL5MtyzlC wDJMhyqejjW+P2ydoomOzqzQEAHWTFg3kzK28UonRJ6mmY0PojLhMCQVrsrJU3rQXn55lU Fii5UuzTvKdQwTAVieUPmR58/3HNO8qrVzvNI4fYfgE8wxe6dbi5aIdfSD47/2aGZ66kqL q4LDkrUVgXgGwTPby543BEuEQt5NLBbfvc00biJjmkra0vRXFi1DuyjlGkd0sQ== 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 4WN1vY2JzKzt3F; Mon, 15 Jul 2024 12:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FCcHmb060601; Mon, 15 Jul 2024 12:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCcH3A060598; Mon, 15 Jul 2024 12:38:17 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:17 GMT Message-Id: <202407151238.46FCcH3A060598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: f9210d37c5c6 - stable/13 - rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_Entry 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f9210d37c5c6ef427af619f2bf0ff7157415fa47 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f9210d37c5c6ef427af619f2bf0ff7157415fa47 commit f9210d37c5c6ef427af619f2bf0ff7157415fa47 Author: Andrew Turner AuthorDate: 2024-05-07 15:49:53 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:34:29 +0000 rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_Entry Add a macro the architectures can use to add per-arch fields to Struct_Obj_Entry. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45116 (cherry picked from commit 06db20ffeca9898e5802d63f3b06caaa37c3a4ed) --- libexec/rtld-elf/aarch64/rtld_machdep.h | 2 ++ libexec/rtld-elf/amd64/rtld_machdep.h | 2 ++ libexec/rtld-elf/arm/rtld_machdep.h | 2 ++ libexec/rtld-elf/i386/rtld_machdep.h | 2 ++ libexec/rtld-elf/powerpc/rtld_machdep.h | 2 ++ libexec/rtld-elf/powerpc64/rtld_machdep.h | 2 ++ libexec/rtld-elf/riscv/rtld_machdep.h | 2 ++ libexec/rtld-elf/rtld.h | 2 ++ 8 files changed, 16 insertions(+) diff --git a/libexec/rtld-elf/aarch64/rtld_machdep.h b/libexec/rtld-elf/aarch64/rtld_machdep.h index ffb340d17ffa..daa0f4fb28eb 100644 --- a/libexec/rtld-elf/aarch64/rtld_machdep.h +++ b/libexec/rtld-elf/aarch64/rtld_machdep.h @@ -37,6 +37,8 @@ struct Struct_Obj_Entry; +#define MD_OBJ_ENTRY + /* Return the address of the .dynamic section in the dynamic linker. */ #define rtld_dynamic(obj) \ ({ \ diff --git a/libexec/rtld-elf/amd64/rtld_machdep.h b/libexec/rtld-elf/amd64/rtld_machdep.h index 40d9e37263b6..037c7ed2bb7f 100644 --- a/libexec/rtld-elf/amd64/rtld_machdep.h +++ b/libexec/rtld-elf/amd64/rtld_machdep.h @@ -35,6 +35,8 @@ struct Struct_Obj_Entry; +#define MD_OBJ_ENTRY + /* Return the address of the .dynamic section in the dynamic linker. */ Elf_Dyn *rtld_dynamic_addr(void); #define rtld_dynamic(obj) rtld_dynamic_addr() diff --git a/libexec/rtld-elf/arm/rtld_machdep.h b/libexec/rtld-elf/arm/rtld_machdep.h index cbb0e4ac71c9..592176768afb 100644 --- a/libexec/rtld-elf/arm/rtld_machdep.h +++ b/libexec/rtld-elf/arm/rtld_machdep.h @@ -36,6 +36,8 @@ struct Struct_Obj_Entry; +#define MD_OBJ_ENTRY + /* Return the address of the .dynamic section in the dynamic linker. */ #define rtld_dynamic(obj) (&_DYNAMIC) diff --git a/libexec/rtld-elf/i386/rtld_machdep.h b/libexec/rtld-elf/i386/rtld_machdep.h index 8213597344f2..dce8d547cfd6 100644 --- a/libexec/rtld-elf/i386/rtld_machdep.h +++ b/libexec/rtld-elf/i386/rtld_machdep.h @@ -35,6 +35,8 @@ struct Struct_Obj_Entry; +#define MD_OBJ_ENTRY + /* Return the address of the .dynamic section in the dynamic linker. */ #define rtld_dynamic(obj) \ ((const Elf_Dyn *)((obj)->relocbase + (Elf_Addr)&_DYNAMIC)) diff --git a/libexec/rtld-elf/powerpc/rtld_machdep.h b/libexec/rtld-elf/powerpc/rtld_machdep.h index 107bde901c68..1601560437bd 100644 --- a/libexec/rtld-elf/powerpc/rtld_machdep.h +++ b/libexec/rtld-elf/powerpc/rtld_machdep.h @@ -35,6 +35,8 @@ struct Struct_Obj_Entry; +#define MD_OBJ_ENTRY + /* Return the address of the .dynamic section in the dynamic linker. */ #define rtld_dynamic(obj) (&_DYNAMIC) diff --git a/libexec/rtld-elf/powerpc64/rtld_machdep.h b/libexec/rtld-elf/powerpc64/rtld_machdep.h index e4f27f2fff61..ff4145b3fe9c 100644 --- a/libexec/rtld-elf/powerpc64/rtld_machdep.h +++ b/libexec/rtld-elf/powerpc64/rtld_machdep.h @@ -35,6 +35,8 @@ struct Struct_Obj_Entry; +#define MD_OBJ_ENTRY + /* Return the address of the .dynamic section in the dynamic linker. */ #define rtld_dynamic(obj) (&_DYNAMIC) diff --git a/libexec/rtld-elf/riscv/rtld_machdep.h b/libexec/rtld-elf/riscv/rtld_machdep.h index b4ae4cb5512f..6080f297be84 100644 --- a/libexec/rtld-elf/riscv/rtld_machdep.h +++ b/libexec/rtld-elf/riscv/rtld_machdep.h @@ -42,6 +42,8 @@ struct Struct_Obj_Entry; +#define MD_OBJ_ENTRY + uint64_t set_gp(struct Struct_Obj_Entry *obj); /* Return the address of the .dynamic section in the dynamic linker. */ diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 1f9b82caef33..2673e62ddd65 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -283,6 +283,8 @@ typedef struct Struct_Obj_Entry { bool unholdfree : 1; /* unmap upon last unhold */ bool doomed : 1; /* Object cannot be referenced */ + MD_OBJ_ENTRY; + struct link_map linkmap; /* For GDB and dlinfo() */ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ Objlist dagmembers; /* DAG has these members (%) */