From nobody Thu Jan 18 22:25:49 2024 X-Original-To: dev-commits-src-all@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 4TGHQ552qpz578NF; Thu, 18 Jan 2024 22:25:49 +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 4TGHQ52M3cz40xM; Thu, 18 Jan 2024 22:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705616749; 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=AufMIeha4kocc6QrRL/5eSltJblUkb+DuOrBKx++Tqk=; b=KMi2gF63Oosz7cOjVX4EknAaMC79cDc4nbpDkUSCgH2wiL7C9LPMXL3CsmTZCjrYukf/cT EHwDTZ1XLncpY8HdKs0wmlaigl6vpY2/Jx2iRB+S6/Z0TiadfD9exiOrU/Vpc7xfYfRZ9k XHnCKBXLT+D5A0Ukqp0TSXVvkTtbAQVACIkKtSM1SZn36Je3af3nJAoT/EfUhZ4hDE8SuU fUBWVUI3PRRFlWFUwMjnvUVv4PkfAoVFsPLIkd/kUOpID7MvD1eKAVtMNP8M6udoC5sCCQ JGmF5A8KpUw27aal3JxCipeh833VJ4VYr6r0sr2PwRQylXShw3KRR6pSZ8rl0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705616749; 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=AufMIeha4kocc6QrRL/5eSltJblUkb+DuOrBKx++Tqk=; b=fv90FrYOGa9C8RxPV6/8CHGX3xMZiMhF4jArI0IoRdsBUSPAcyouyHsaAd5u+Ndj0MyEgG GSJEZH9DnIRUPLc71h2s4rkJzVmL/65MmEu4LUsDasMqO374JDBSWxpUTXyG7msihFVdDS hqPswFF4KlT48FCKgVGhWnPaUuGh+J2fULBoDamiYOqoD0gRhWRi3z5v8K/92qCfeO7d7z jY3WuBs3V38pHvcUlfmi1dK4DKiB2TWTc3sUNIb3EPrABAknFiawirpIbMple9VRIc7Hwo 1cIkdYophXCwfmh/RI97e+YauaNGfH9iSfkpX0/c91zTfYl0Pu8LD4Fs/PMs0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705616749; a=rsa-sha256; cv=none; b=hTvv8WiRA9nNAbfP1u9bbj+mwASwxk9pEHJuBwvsIw2Q6sP8CMmGrWFx3aujEeozP+ZE/s ULN2elgDh5cfOIyfquf+snxxInlq3VPVeqRRpdxJVGN5O0ncwmVQESxBMlKojoUhlyuVNm MPG9yWZYrP051d+D0aEOsjqiODc5JqYBxgG3faKdjXE6dZZPP80MxEEqYexbLSItoSqBV8 E110/xlUWaZWABt82CTyLdX+LFGpFciZXtnwHD/nZyenh1Y1KXmY9CcNV+2DRP4U5qNyhP ecvDkWvY4shuqO+r1TSvDmKzkI/aJ75FyAkQQ4SBX6wtZql3wlH9y48Cz6/lPw== 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 4TGHQ5198FzQWb; Thu, 18 Jan 2024 22:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40IMPnGj088989; Thu, 18 Jan 2024 22:25:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IMPnI4088986; Thu, 18 Jan 2024 22:25:49 GMT (envelope-from git) Date: Thu, 18 Jan 2024 22:25:49 GMT Message-Id: <202401182225.40IMPnI4088986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 92222d8aee57 - stable/14 - kldxref: fix build on 32 bits arches List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 92222d8aee57f8c2f77261f716140dbb912964d4 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=92222d8aee57f8c2f77261f716140dbb912964d4 commit 92222d8aee57f8c2f77261f716140dbb912964d4 Author: Baptiste Daroussin AuthorDate: 2023-12-13 08:19:18 +0000 Commit: John Baldwin CommitDate: 2024-01-18 21:29:40 +0000 kldxref: fix build on 32 bits arches (cherry picked from commit 97530894fc142a9c44a5909e6ae668dc95a5036a) --- usr.sbin/kldxref/ef.h | 4 ++-- usr.sbin/kldxref/ef_obj.c | 4 ++-- usr.sbin/kldxref/elf.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/kldxref/ef.h b/usr.sbin/kldxref/ef.h index a96bd72d6931..2909704bf2d1 100644 --- a/usr.sbin/kldxref/ef.h +++ b/usr.sbin/kldxref/ef.h @@ -218,7 +218,7 @@ int elf_read_shdrs(struct elf_file *efile, size_t *nshdrp, * Read the dynamic table from a section of an ELF file into a * dynamically-allocated array of GElf_Dyn objects. */ -int elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, +int elf_read_dynamic(struct elf_file *efile, int section_index, size_t *ndynp, GElf_Dyn **dynp); /* @@ -226,7 +226,7 @@ int elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, * dynamically-allocated array of GElf_Sym objects. */ int elf_read_symbols(struct elf_file *efile, int section_index, - long *nsymp, GElf_Sym **symp); + size_t *nsymp, GElf_Sym **symp); /* * Read a string table described by a section header of an ELF file diff --git a/usr.sbin/kldxref/ef_obj.c b/usr.sbin/kldxref/ef_obj.c index a1d46241b803..36c0dce432b6 100644 --- a/usr.sbin/kldxref/ef_obj.c +++ b/usr.sbin/kldxref/ef_obj.c @@ -82,7 +82,7 @@ struct ef_file { int nrel; GElf_Sym *ddbsymtab; /* The symbol table we are using */ - long ddbsymcnt; /* Number of symbols */ + size_t ddbsymcnt; /* Number of symbols */ caddr_t ddbstrtab; /* String table */ long ddbstrcnt; /* number of bytes in string table */ @@ -155,7 +155,7 @@ ef_obj_symaddr(elf_file_t ef, GElf_Size symidx) { const GElf_Sym *sym; - if (symidx >= (size_t)ef->ddbsymcnt) + if (symidx >= ef->ddbsymcnt) return (0); sym = ef->ddbsymtab + symidx; diff --git a/usr.sbin/kldxref/elf.c b/usr.sbin/kldxref/elf.c index a30eb4456a76..f8a6510ed352 100644 --- a/usr.sbin/kldxref/elf.c +++ b/usr.sbin/kldxref/elf.c @@ -329,7 +329,7 @@ out: } int -elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, +elf_read_dynamic(struct elf_file *efile, int section_index, size_t *ndynp, GElf_Dyn **dynp) { GElf_Shdr shdr; @@ -365,14 +365,14 @@ elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, } int -elf_read_symbols(struct elf_file *efile, int section_index, long *nsymp, +elf_read_symbols(struct elf_file *efile, int section_index, size_t *nsymp, GElf_Sym **symp) { GElf_Shdr shdr; Elf_Scn *scn; Elf_Data *data; GElf_Sym *sym; - long i, nsym; + size_t i, nsym; scn = elf_getscn(efile->ef_elf, section_index); if (scn == NULL)