hw/avr/boot: Replace load_elf_ram_sym() -> load_elf_as()
load_elf_ram_sym() with load_rom=true, sym_cb=NULL is equivalent to load_elf_as(). Replace by the latter to simplify. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250127113824.50177-2-philmd@linaro.org>
This commit is contained in:
parent
a40b5f3286
commit
29c7bd8eaf
@ -71,11 +71,9 @@ bool avr_load_firmware(AVRCPU *cpu, MachineState *ms,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_loaded = load_elf_ram_sym(filename,
|
bytes_loaded = load_elf_as(filename, NULL, NULL, NULL,
|
||||||
NULL, NULL, NULL,
|
&entry, NULL, NULL,
|
||||||
&entry, NULL, NULL,
|
&e_flags, 0, EM_AVR, 0, 0, NULL);
|
||||||
&e_flags, 0, EM_AVR, 0, 0,
|
|
||||||
NULL, true, NULL);
|
|
||||||
if (bytes_loaded >= 0) {
|
if (bytes_loaded >= 0) {
|
||||||
/* If ELF file is provided, determine CPU type reading ELF e_flags. */
|
/* If ELF file is provided, determine CPU type reading ELF e_flags. */
|
||||||
const char *elf_cpu = avr_elf_e_flags_to_cpu_type(e_flags);
|
const char *elf_cpu = avr_elf_e_flags_to_cpu_type(e_flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user