> On Aug 10, 2021, at 11:27 AM, Richard Henderson > <[email protected]> wrote: > > On 8/7/21 11:42 AM, Warner Losh wrote: >> From: Warner Losh <[email protected]> >> 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 <[email protected]> >> Signed-off-by: Warner Losh <[email protected]> >> 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; >> +} > > No warnings from this, e.g. uninitialized variable? > If you have a chance, run this through clang-12 (mainline). > It it getting much better at identifying such stuff.
It’s easy enough to initialize en, so I’ve done that. Warner > Otherwise, > Reviewed-by: Richard Henderson <[email protected]> > > > r~
signature.asc
Description: Message signed with OpenPGP
