diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 98a2fcffbc65..ac4cc8c085cb 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -369,8 +369,9 @@ link_elf_link_preload(linker_class_t cls, const char *filename, dpcpu = dpcpu_alloc(shdr[i].sh_size); if (dpcpu == NULL) { printf("%s: pcpu module space is out " - "of space; cannot allocate %ld for " - "%s\n", __func__, shdr[i].sh_size, + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, filename); error = ENOSPC; goto out; @@ -387,8 +388,9 @@ link_elf_link_preload(linker_class_t cls, const char *filename, vnet_data = vnet_data_alloc(shdr[i].sh_size); if (vnet_data == NULL) { printf("%s: vnet module space is out " - "of space; cannot allocate %ld for " - "%s\n", __func__, shdr[i].sh_size, + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, filename); error = ENOSPC; goto out; @@ -860,8 +862,9 @@ link_elf_load_file(linker_class_t cls, const char *filename, dpcpu_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { printf("%s: pcpu module space is out " - "of space; cannot allocate %ld for " - "%s\n", __func__, shdr[i].sh_size, + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, filename); } } @@ -872,8 +875,9 @@ link_elf_load_file(linker_class_t cls, const char *filename, vnet_data_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { printf("%s: vnet module space is out " - "of space; cannot allocate %ld for " - "%s\n", __func__, shdr[i].sh_size, + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, filename); } }