From: Warner Losh <imp@FreeBSD.org>
Add a stubbed-out version of the bsd-user fork's core dump support. This
allows elfload.c to be almost the same between what's upstream and
what's in qemu-project upstream w/o the burden of reviewing the core
dump support.
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Sponsored by: Netflix
---
bsd-user/elfcore.c | 10 ++++++++++
bsd-user/elfload.c | 24 ++++++++++++++++++++++--
bsd-user/qemu.h | 6 ++++++
3 files changed, 38 insertions(+), 2 deletions(-)
create mode 100644 bsd-user/elfcore.c
diff --git a/bsd-user/elfcore.c b/bsd-user/elfcore.c
new file mode 100644
index 0000000000..e3c161942d
--- /dev/null
+++ b/bsd-user/elfcore.c
@@ -0,0 +1,10 @@
+/* Stubbed out version of core dump support, explicitly in public domain */
+
+static int elf_core_dump(int signr, CPUArchState *env)
+{
+ struct elf_note en;
+
+ bswap_note(&en);
+
+ return 0;
+}