mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-20 11:34:02 +08:00
kbuild: fix format string warnings in modpost
Fix wrong format strings in modpost exposed by the previous patch. Including one missing argument -- some random data was printed instead. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
6d9a89ea4b
commit
58b7a68de3
@ -388,7 +388,7 @@ static int parse_elf(struct elf_info *info, const char *filename)
|
|||||||
|
|
||||||
/* Check if file offset is correct */
|
/* Check if file offset is correct */
|
||||||
if (hdr->e_shoff > info->size) {
|
if (hdr->e_shoff > info->size) {
|
||||||
fatal("section header offset=%u in file '%s' is bigger then filesize=%lu\n", hdr->e_shoff, filename, info->size);
|
fatal("section header offset=%lu in file '%s' is bigger then filesize=%lu\n", (unsigned long)hdr->e_shoff, filename, info->size);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ static int parse_elf(struct elf_info *info, const char *filename)
|
|||||||
const char *secname;
|
const char *secname;
|
||||||
|
|
||||||
if (sechdrs[i].sh_offset > info->size) {
|
if (sechdrs[i].sh_offset > info->size) {
|
||||||
fatal("%s is truncated. sechdrs[i].sh_offset=%u > sizeof(*hrd)=%ul\n", filename, (unsigned int)sechdrs[i].sh_offset, sizeof(*hdr));
|
fatal("%s is truncated. sechdrs[i].sh_offset=%lu > sizeof(*hrd)=%lu\n", filename, (unsigned long)sechdrs[i].sh_offset, sizeof(*hdr));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
secname = secstrings + sechdrs[i].sh_name;
|
secname = secstrings + sechdrs[i].sh_name;
|
||||||
@ -907,7 +907,8 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,
|
|||||||
"before '%s' (at offset -0x%llx)\n",
|
"before '%s' (at offset -0x%llx)\n",
|
||||||
modname, fromsec, (unsigned long long)r.r_offset,
|
modname, fromsec, (unsigned long long)r.r_offset,
|
||||||
secname, refsymname,
|
secname, refsymname,
|
||||||
elf->strtab + after->st_name);
|
elf->strtab + after->st_name,
|
||||||
|
(unsigned long long)r.r_offset);
|
||||||
} else {
|
} else {
|
||||||
warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n",
|
warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n",
|
||||||
modname, fromsec, (unsigned long long)r.r_offset,
|
modname, fromsec, (unsigned long long)r.r_offset,
|
||||||
|
Loading…
Reference in New Issue
Block a user