diff options
| author | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-03-31 21:26:41 -0700 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-04-01 09:07:13 +0200 |
| commit | 3e7be635937d19b91bab70695328214a3d789d51 (patch) | |
| tree | a3894c0d69b1d9c3355ffd5f1ed1254f11c15f89 /tools/objtool/special.c | |
| parent | 0b10177114d1e434af850b377cf5e6620dd1d525 (diff) | |
| download | linux-3e7be635937d19b91bab70695328214a3d789d51.tar.gz linux-3e7be635937d19b91bab70695328214a3d789d51.tar.bz2 linux-3e7be635937d19b91bab70695328214a3d789d51.zip | |
objtool: Change "warning:" to "error: " for fatal errors
This is similar to GCC's behavior and makes it more obvious why the
build failed.
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/0ea76f4b0e7a370711ed9f75fd0792bb5979c2bf.1743481539.git.jpoimboe@kernel.org
Diffstat (limited to 'tools/objtool/special.c')
| -rw-r--r-- | tools/objtool/special.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/objtool/special.c b/tools/objtool/special.c index 6cd7b1be5331..c80fed8a840e 100644 --- a/tools/objtool/special.c +++ b/tools/objtool/special.c @@ -86,7 +86,7 @@ static int get_alt_entry(struct elf *elf, const struct special_entry *entry, orig_reloc = find_reloc_by_dest(elf, sec, offset + entry->orig); if (!orig_reloc) { - WARN_FUNC("can't find orig reloc", sec, offset + entry->orig); + ERROR_FUNC(sec, offset + entry->orig, "can't find orig reloc"); return -1; } @@ -97,8 +97,7 @@ static int get_alt_entry(struct elf *elf, const struct special_entry *entry, if (!entry->group || alt->new_len) { new_reloc = find_reloc_by_dest(elf, sec, offset + entry->new); if (!new_reloc) { - WARN_FUNC("can't find new reloc", - sec, offset + entry->new); + ERROR_FUNC(sec, offset + entry->new, "can't find new reloc"); return -1; } @@ -114,8 +113,7 @@ static int get_alt_entry(struct elf *elf, const struct special_entry *entry, key_reloc = find_reloc_by_dest(elf, sec, offset + entry->key); if (!key_reloc) { - WARN_FUNC("can't find key reloc", - sec, offset + entry->key); + ERROR_FUNC(sec, offset + entry->key, "can't find key reloc"); return -1; } alt->key_addend = reloc_addend(key_reloc); @@ -145,8 +143,7 @@ int special_get_alts(struct elf *elf, struct list_head *alts) continue; if (sec->sh.sh_size % entry->size != 0) { - WARN("%s size not a multiple of %d", - sec->name, entry->size); + ERROR("%s size not a multiple of %d", sec->name, entry->size); return -1; } @@ -155,7 +152,7 @@ int special_get_alts(struct elf *elf, struct list_head *alts) for (idx = 0; idx < nr_entries; idx++) { alt = malloc(sizeof(*alt)); if (!alt) { - WARN("malloc failed"); + ERROR_GLIBC("malloc failed"); return -1; } memset(alt, 0, sizeof(*alt)); |
