This is the mail archive of the
mailing list for the binutils project.
Re: Are ppc*_elf_write_core_note Os-specific?
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: John Baldwin <jhb at freebsd dot org>, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>, Binutils <binutils at sourceware dot org>, GDB <gdb at sourceware dot org>
- Date: Tue, 19 Jan 2016 08:41:05 -0800
- Subject: Re: Are ppc*_elf_write_core_note Os-specific?
- Authentication-results: sourceware.org; auth=none
- References: <1736699 dot V7zq9VJIrx at ralph dot baldwin dot cx> <20160119001819 dot GB17028 at bubble dot grove dot modra dot org> <20160119031407 dot GD17028 at bubble dot grove dot modra dot org>
On Mon, Jan 18, 2016 at 7:14 PM, Alan Modra <email@example.com> wrote:
> On Tue, Jan 19, 2016 at 10:48:19AM +1030, Alan Modra wrote:
>> PowerPC64 glibc even now doesn't defing prstatus32_t. :-( It seems
>> only sparc and s390 do so. So PowerPC would need a
>> hosts/powerpc-linux.h to define them for Linux, with some configury
>> changes, like hosts/x86-64linux.h does for x86-64 Linux. I'll see
>> about making those changes.
>> Note that elf_backend_write_core_note is defined for x86-64, arm and
>> aarch64 too. The ARM and AARCH64 functions look to be completely
>> redundant, and I suspect all of them could disappear if we modify the
>> generic code to handle prstatusx32_t for x86-64.
> Actually, there is a reason for the ARM and AARCH64 functions.
> See https://sourceware.org/ml/binutils/2011-10/msg00202.html
> Note the followup emails too..
> So it seems that with the current infrastructure we can either support
> core file generation on remote (linux) targets, or core file
> generation on more native targets (freebsd). Alternatively, we'd
> need to use separate bfd target vectors for linux and freebsd, which
> can and will cause multiple target matches.
> Do we really want non-native core file generation?
Any changes shouldn't introduce regressions. I don't see why
elf_backend_write_core_note can't handle all targets BFD supports
since note_type is unique to each OS. BFD just needs to provide
proper types independent of host header files, similar to