qemu-e2k/include
Aleksandar Markovic 6cdda0ff4b hw/core/loader: Let load_elf() populate a field with CPU-specific flags
While loading the executable, some platforms (like AVR) need to
detect CPU type that executable is built for - and, with this patch,
this is enabled by reading the field 'e_flags' of the ELF header of
the executable in question. The change expands functionality of
the following functions:

  - load_elf()
  - load_elf_as()
  - load_elf_ram()
  - load_elf_ram_sym()

The argument added to these functions is called 'pflags' and is of
type 'uint32_t*' (that matches 'pointer to 'elf_word'', 'elf_word'
being the type of the field 'e_flags', in both 32-bit and 64-bit
variants of ELF header). Callers are allowed to pass NULL as that
argument, and in such case no lookup to the field 'e_flags' will
happen, and no information will be returned, of course.

CC: Richard Henderson <rth@twiddle.net>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: Edgar E. Iglesias <edgar.iglesias@gmail.com>
CC: Michael Walle <michael@walle.cc>
CC: Thomas Huth <huth@tuxfamily.org>
CC: Laurent Vivier <laurent@vivier.eu>
CC: Philippe Mathieu-Daudé <f4bug@amsat.org>
CC: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
CC: Aurelien Jarno <aurelien@aurel32.net>
CC: Jia Liu <proljc@gmail.com>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: BALATON Zoltan <balaton@eik.bme.hu>
CC: Christian Borntraeger <borntraeger@de.ibm.com>
CC: Thomas Huth <thuth@redhat.com>
CC: Artyom Tarasenko <atar4qemu@gmail.com>
CC: Fabien Chouteau <chouteau@adacore.com>
CC: KONRAD Frederic <frederic.konrad@adacore.com>
CC: Max Filippov <jcmvbkbc@gmail.com>

Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
Signed-off-by: Michael Rolnik <mrolnik@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1580079311-20447-24-git-send-email-aleksandar.markovic@rt-rk.com>
2020-01-29 19:28:52 +01:00
..
authz Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
block block: Add bdrv_qapi_perm_to_blk_perm() 2020-01-06 13:43:06 +01:00
chardev chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
crypto crypto: Fix typo in QCryptoTLSSession's <example> comment 2019-12-18 08:36:15 +01:00
disas disas: Add a field for target-dependant data to disassemble_info 2020-01-29 19:28:52 +01:00
exec cputlb: Make tlb_n_entries private to cputlb.c 2020-01-21 14:21:59 -10:00
fpu fpu: make softfloat-macros "self-contained" 2019-08-19 12:07:13 +01:00
hw hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
io io: Fix Error usage in a comment <example> 2019-12-18 08:36:15 +01:00
libdecnumber include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
migration migration: Support QLIST migration 2020-01-20 09:10:23 +01:00
monitor hmp: drop Error pointer indirection in hmp_handle_error 2019-12-18 08:36:16 +01:00
net Include qemu/queue.h slightly less 2019-08-16 13:31:52 +02:00
qapi qstring: add qstring_free() 2020-01-24 20:59:13 +01:00
qemu migration: Support QLIST migration 2020-01-20 09:10:23 +01:00
qom qom: introduce object_property_help() 2020-01-24 20:59:16 +01:00
scsi scsi: explicitly list guest-recoverable sense codes 2019-07-15 11:20:42 +02:00
standard-headers virtiofsd: Pull in kernel's fuse.h 2020-01-23 16:41:36 +00:00
sysemu accel: Introduce the current_accel() wrapper 2020-01-24 20:59:11 +01:00
tcg tcg: Move TCG headers to include/tcg/ 2020-01-15 15:13:10 -10:00
ui display/gtk: get proper refreshrate 2020-01-14 07:26:36 +01:00
user linux-user: Include trace-root.h in syscall-trace.h 2020-01-15 15:13:09 -10:00
elf.h target/arm/arch_dump: Add SVE notes 2020-01-23 15:34:04 +00:00
glib-compat.h glib: bump min required glib library version to 2.48 2019-08-22 10:46:34 +01:00
qemu-common.h exec: Split out variable page size support to exec-vary.c 2019-10-28 10:26:02 +01:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00