From nobody Tue Oct 08 19:40:30 2024 X-Original-To: dev-commits-src-main@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 4XNRFV5kjzz5YK3G; Tue, 08 Oct 2024 19:40:30 +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 4XNRFV416Tz4LpP; Tue, 8 Oct 2024 19:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728416430; 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=bkmkttOH2+67Cm8yC7oFZmIbq/YN0Y8dH2nhCga1CUY=; b=DKfMchM4lqWr7+NcMhH1ywLSXde5ozw0rsheUSvgSOMGhsLovjvMLjRrH8jagTYFbxnh4G EoiN6Pu9dH84CNDMft1fLukoqkXAqxDxfFs2Tm/8I7r2W+50cekKG6vxuZQtC9XuYRBdCH nHmGzOkDN8Ro80EZ2xN1dlDVbu/W+w2OBJvkhFuwgCn+eL8MlCenvKc0nxI9omvzwz7m07 6YCcx6hYTdB+0eAA6vimVmXmm1tU7S3vilpkPim0qq7ngc24FvIkzlIoaNFyFk3U5pUziy y+XV2A1XASya6nF003Sr495Ulh19OjrG1h9mG1AdNp4iC8KHCHPpUv28tGp1dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728416430; 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=bkmkttOH2+67Cm8yC7oFZmIbq/YN0Y8dH2nhCga1CUY=; b=g5blDVq/Wg72DHhrwEwOte7euoPX0FOZUNQ4BAM5nBfWsLU2NMTiPkNpgfHMbkF0/1LXf4 6RKYJN0BcmeWPVZCiMZY40TCoCWAVVu3GeKa5viwVpeit5/hJA8K9AS+xtDqOapb+c3cEA FS+3PYyOgvbqQrmyqdxkOM3ImnhnTJf/BsgCTNRUUAJFBKaexMmVkAHKzoYkSQBUsT69H4 m+lgjBkE4+71Uxri9LSJRcvIxlchOSekcoV2i1sPZTCfeO2ntEC3LXyX/kZipF/WSswzTg 91peSuJPb/f6ML7JA65A9iKwGsWA+uGZdhVDPUgUtA/MXbgryahjILvCzxE0YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728416430; a=rsa-sha256; cv=none; b=uQ1dUHJbw7NXBF4/CWy+cwhjBYcfzlmZ2Q4iSORl761X958zb5+f97zN/DKMOPIqS6RlXS 2XxzKJsM7H/cwdC1Z34mmY6ijxo5Eoux5uBigCAY9u4SMvNyMPuT6Qk+ITLJlYEIANppoQ Lrc6NQV3JE28k23yjJN97377UDZc9oKg4aJewHv1F/yI8pckhYie+Rh5gdfDxtu4uzlghn HvyMs1aBYupUTsfu2j+KjDIlM5RtkxTO+iLub+sX0Kr+ECc4WlOVitt47NkPsPo3acZDO5 u9u/nVpOwJn+Y5EOAHtuEKvcoZwDi/hnC4tTWtymgYDHaAfVdomvXtwqscyAaA== 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 4XNRFV3dMvzjY8; Tue, 8 Oct 2024 19:40:30 +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 498JeUxg035898; Tue, 8 Oct 2024 19:40:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 498JeU1W035895; Tue, 8 Oct 2024 19:40:30 GMT (envelope-from git) Date: Tue, 8 Oct 2024 19:40:30 GMT Message-Id: <202410081940.498JeU1W035895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 7007de7d1095 - main - Revert "libkldelf: add elf_lookup_symbol function" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7007de7d1095e2bc45111756b3e5d3bc6f446a9d Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=7007de7d1095e2bc45111756b3e5d3bc6f446a9d commit 7007de7d1095e2bc45111756b3e5d3bc6f446a9d Author: Ka Ho Ng AuthorDate: 2024-10-08 19:40:13 +0000 Commit: Ka Ho Ng CommitDate: 2024-10-08 19:40:13 +0000 Revert "libkldelf: add elf_lookup_symbol function" This reverts commit 2c7d84795628cb9c7a266718b99b6bca68e0a135. --- lib/libkldelf/ef.c | 1 - lib/libkldelf/ef_obj.c | 1 - lib/libkldelf/elf.c | 6 ------ lib/libkldelf/kldelf.h | 13 ------------- 4 files changed, 21 deletions(-) diff --git a/lib/libkldelf/ef.c b/lib/libkldelf/ef.c index dcd87fe2bf83..052798ee31e4 100644 --- a/lib/libkldelf/ef.c +++ b/lib/libkldelf/ef.c @@ -89,7 +89,6 @@ static struct elf_file_ops ef_file_ops = { .seg_read_string = ef_seg_read_string, .symaddr = ef_symaddr, .lookup_set = ef_lookup_set, - .lookup_symbol = ef_lookup_symbol, }; static void diff --git a/lib/libkldelf/ef_obj.c b/lib/libkldelf/ef_obj.c index 32a7c17127ed..e09bd036b71e 100644 --- a/lib/libkldelf/ef_obj.c +++ b/lib/libkldelf/ef_obj.c @@ -109,7 +109,6 @@ static struct elf_file_ops ef_obj_file_ops = { .seg_read_string = ef_obj_seg_read_string, .symaddr = ef_obj_symaddr, .lookup_set = ef_obj_lookup_set, - .lookup_symbol = ef_obj_lookup_symbol, }; static GElf_Off diff --git a/lib/libkldelf/elf.c b/lib/libkldelf/elf.c index 8af02622de13..da319ffc6c98 100644 --- a/lib/libkldelf/elf.c +++ b/lib/libkldelf/elf.c @@ -686,9 +686,3 @@ elf_reloc(struct elf_file *efile, const void *reldata, Elf_Type reltype, return (efile->ef_reloc(efile, reldata, reltype, relbase, dataoff, len, dest)); } - -int -elf_lookup_symbol(struct elf_file *efile, const char *name, GElf_Sym **sym) -{ - return (EF_LOOKUP_SYMBOL(efile, name, sym)); -} diff --git a/lib/libkldelf/kldelf.h b/lib/libkldelf/kldelf.h index 71de31a94291..e0a8cc627ff2 100644 --- a/lib/libkldelf/kldelf.h +++ b/lib/libkldelf/kldelf.h @@ -48,8 +48,6 @@ (ef)->ef_ops->symaddr((ef)->ef_ef, symidx) #define EF_LOOKUP_SET(ef, name, startp, stopp, countp) \ (ef)->ef_ops->lookup_set((ef)->ef_ef, name, startp, stopp, countp) -#define EF_LOOKUP_SYMBOL(ef, name, sym) \ - (ef)->ef_ops->lookup_symbol((ef)->ef_ef, name, sym) /* XXX, should have a different name. */ typedef struct ef_file *elf_file_t; @@ -69,7 +67,6 @@ struct elf_file_ops { GElf_Addr (*symaddr)(elf_file_t ef, GElf_Size symidx); int (*lookup_set)(elf_file_t ef, const char *name, GElf_Addr *startp, GElf_Addr *stopp, long *countp); - int (*lookup_symbol)(elf_file_t ef, const char *name, GElf_Sym **sym); }; typedef int (elf_reloc_t)(struct elf_file *ef, const void *reldata, @@ -313,16 +310,6 @@ int elf_read_mod_pnp_match_info(struct elf_file *efile, GElf_Addr addr, int elf_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest); -/* - * Find the symbol with the specified symbol name 'name' within the given - * 'efile'. 0 is returned when such a symbol is found, otherwise ENOENT is - * returned. - * - * XXX: This only return the first symbol being found when traversing symtab. - */ -int elf_lookup_symbol(struct elf_file *efile, const char *name, - GElf_Sym **sym); - __END_DECLS #endif /* _KLDELF_H_*/