aboutsummaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-11-20 15:08:28 +0000
committerAlex Bennée <alex.bennee@linaro.org>2023-11-23 14:10:06 +0000
commit575aac007cfa5a28315f5c5658d3cf64cd6a5de4 (patch)
tree5659a3acf1013e96a3665c806850b8db41047232 /hw/core
parent84dd7d88c98831f1ef95262990ea185a36c79fa1 (diff)
hw/core: skip loading debug on all failures
ELF_LOAD_FAILED is one of many negative return codes we can have. Lets treat any positive size_t as a success for loading. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231120150833.2552739-10-alex.bennee@linaro.org>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 3c79283777..e7a9b3775b 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -505,7 +505,7 @@ ssize_t load_elf_ram_sym(const char *filename,
clear_lsb, data_swab, as, load_rom, sym_cb);
}
- if (ret != ELF_LOAD_FAILED) {
+ if (ret > 0) {
debuginfo_report_elf(filename, fd, 0);
}