diff options
author | Mitchell Horne <mhorne@FreeBSD.org> | 2020-10-07 18:48:10 +0000 |
---|---|---|
committer | Mitchell Horne <mhorne@FreeBSD.org> | 2020-10-07 18:48:10 +0000 |
commit | 8481aab1ac34ef07fcf747efbcf4fdbb0435b2f0 (patch) | |
tree | 785ea3ad4528b61ff876ce3b2106c7f323102d0d /sys/riscv | |
parent | 194ddc011ad10900a405fb81cf48a022badf77b8 (diff) | |
download | src-8481aab1ac34ef07fcf747efbcf4fdbb0435b2f0.tar.gz src-8481aab1ac34ef07fcf747efbcf4fdbb0435b2f0.zip |
Print symbol index for unsupported relocation types
It is unlikely, but possible, that an unrecognized or unsupported
relocation type is encountered while trying to load a kernel module. If
this occurs we should offer the symbol index as a hint to the user.
While here, fix some small style issues.
Reviewed by: markj, kib (amd64 part, in D26701)
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Notes
Notes:
svn path=/head/; revision=366519
Diffstat (limited to 'sys/riscv')
-rw-r--r-- | sys/riscv/riscv/elf_machdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c index f94a7dba09d7..813e8e6c869a 100644 --- a/sys/riscv/riscv/elf_machdep.c +++ b/sys/riscv/riscv/elf_machdep.c @@ -479,7 +479,8 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, break; default: - printf("kldload: unexpected relocation type %ld\n", rtype); + printf("kldload: unexpected relocation type %ld, " + "symbol index %ld\n", rtype, symidx); return (-1); } |