From nobody Thu Jan 18 22:26:20 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 4TGHQh5jhTz578hg; Thu, 18 Jan 2024 22:26:20 +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 4TGHQh2bPFz420w; Thu, 18 Jan 2024 22:26:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705616780; 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=6iHQiW1HGa/3IU+HJPuH4FtHlOb2/17ltsPEtbraEF4=; b=lOMaRep/VrW/Kz0/Jf5BMyuSYa7/S1FgKnFSSLoQOXmp4vIfsS83VSgBUI7OpXI60luLJn 5x1JiICn6FcDjKXMbU2MgLKwNItMcPC64vxmFXt6aABaFNIMykLksbsxdYqL7BG2wW+sPa npGbjJTe5x4mjCathS7a/8mQ6DxdN6q2JoyGhm3ATMmUxBC5aPte1R6KQ0pqqfZqE8ADIq mHUesI6NFY7gevaGtujBC0UslO61vFzYjcQ3bkbFwzGpz+UQfvqx9F6X0iifWStoxGYpFt 0fc4MtbaFk94oiR+XMXurjSKvlebkbU4ibPvcN0ZikwtwSrxwAiNPX5nBPrapg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705616780; 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=6iHQiW1HGa/3IU+HJPuH4FtHlOb2/17ltsPEtbraEF4=; b=I6qz9FfTxKs/9grT5xfILWfpPfWKzplOkX7Hv9KSTRrE6LZLPLo1sY/1sbuYuW84cfRBzI RYVCzn/9I1wk39F2ejkj7+bBUVZTwkLSo72dIJZxrH4OAxMUONpSzoDd401uUVxLIAXcBn 7raB2GbiJbCdo55+MA2AXEkkdiFmgj7P0i4TWi6Ie1qkd89/R57xY5faVJVDPh/a9U1IT4 pIyAdgsoMxZ7GqOlnjkoTvDxYZIm4kzYEbldXOVoGvhagDfx4apmkNg63v8clKLLoluswv U/3/0q8hNxoyoRffal2xiGNCHjcc+GHR7HJIf53Xf3ckTTsStu+TmN9zrE77EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705616780; a=rsa-sha256; cv=none; b=g/IeC63r+gIaaVrh+y4MUMg8Up6hCHWCZMM/77Cv53IWk1imKLrQp1Zz8Fn7zKGEd114lO kCMRxUdHBo74+VfEhPL0U3w6771C/odDD79iwAT5V1Ug5G5sFh3DUcdP0+r1geeOqmVAHA yMfhgQnjlctNtFl2JRrfhJTftrzyLsRLIDkCSnt9ecNAm+fHS6BbbEWcDiod9uf9MIlvLO ML048vnOkZFY3cRCejyP+xoDmEJorlcxAn6VEezrNRDQwVPtrgrCek+9doVluX6FQfp5av 3Xq78y3A8VFXj2K3F4bMzlooqk2deoVm1nTOVe8OOfZIy2DDTb9b5GBgapQhWQ== 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 4TGHQh1hQxzQHv; Thu, 18 Jan 2024 22:26:20 +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 40IMQKIO090133; Thu, 18 Jan 2024 22:26:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IMQKKH090130; Thu, 18 Jan 2024 22:26:20 GMT (envelope-from git) Date: Thu, 18 Jan 2024 22:26:20 GMT Message-Id: <202401182226.40IMQKKH090130@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: a77717659ba8 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: a77717659ba81a19cabc975abc628218a15393ca Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a77717659ba81a19cabc975abc628218a15393ca commit a77717659ba81a19cabc975abc628218a15393ca Author: Baptiste Daroussin AuthorDate: 2023-12-13 08:19:18 +0000 Commit: John Baldwin CommitDate: 2024-01-18 21:29:42 +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)