git: 9c9f4654e4db - stable/13 - kldxref: Don't warn and skip file if no relocations are found
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Dec 2025 18:18:34 UTC
The branch stable/13 has been updated by jrtc27:
URL: https://cgit.FreeBSD.org/src/commit/?id=9c9f4654e4dbfda9921055f32e2e225f1bf1743e
commit 9c9f4654e4dbfda9921055f32e2e225f1bf1743e
Author: Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2024-09-10 17:56:22 +0000
Commit: Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2025-12-15 17:56:35 +0000
kldxref: Don't warn and skip file if no relocations are found
This case is hit for the kernel itself on riscv64, and did not used to
be checked. Since the code here can already handle missing Elf_Rel
and/or Elf_Rela just delete the check.
Reviewed by: jhb, imp
Fixes: 0299afdff145 ("kldxref: Make use of libelf to be a portable cross tool")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D46517
(cherry picked from commit 05996f453de2f2c7a03437a492d9d53831fccb2e)
---
usr.sbin/kldxref/ef.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/usr.sbin/kldxref/ef.c b/usr.sbin/kldxref/ef.c
index 77ddada946f2..975626e46046 100644
--- a/usr.sbin/kldxref/ef.c
+++ b/usr.sbin/kldxref/ef.c
@@ -364,11 +364,6 @@ ef_parse_dynamic(elf_file_t ef, const GElf_Phdr *phdyn)
error = EFTYPE;
goto out;
}
- if (rel_off == 0 && rela_off == 0) {
- warnx("%s: no ELF relocation table found\n", ef->ef_name);
- error = EFTYPE;
- goto out;
- }
nsym = 0;
for (i = 0; i < nshdr; i++) {