]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 313407,313449: Copy ELF machine/flags from binaries to core dumps.
authorjhb <jhb@FreeBSD.org>
Thu, 11 May 2017 17:26:34 +0000 (17:26 +0000)
committerjhb <jhb@FreeBSD.org>
Thu, 11 May 2017 17:26:34 +0000 (17:26 +0000)
commit1ab4373cafea8d13701d093b10df86fbd869d37b
treeecdc1a75821e4bc72e1fd3cf5d2e341984409943
parent7a83feafdc958c9ea4db14fb1d02cb5bae615e3e
MFC 313407,313449: Copy ELF machine/flags from binaries to core dumps.

313407:
Copy the e_machine and e_flags fields from the binary into an ELF core dump.

In the kernel, cache the machine and flags fields from ELF header to use in
the ELF header of a core dump. For gcore, the copy these fields over from
the ELF header in the binary.

This matters for platforms which encode ABI information in the flags field
(such as o32 vs n32 on MIPS).

313449:
Trim trailing whitespace (mostly introduced in r313407).

Sponsored by: DARPA / AFRL
sys/kern/imgact_elf.c
sys/kern/kern_fork.c
sys/sys/proc.h
usr.bin/gcore/elfcore.c