From 28ce4e89d34a5cdb6265cf477e535326271f9abe Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 12 Mar 2015 14:51:42 -0700 Subject: backends: Add x32_corenote.c This patch adds x32_corenote.c to support x32 coredump. X32 coredump is a hybrid between ia32 coredump and x86-64 coredump. The exact formats are described in bfd/hosts/x86-64linux.h in GNU binutils source tree. Signed-off-by: H.J. Lu --- backends/x86_64_init.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'backends/x86_64_init.c') diff --git a/backends/x86_64_init.c b/backends/x86_64_init.c index b885558b..273eabbf 100644 --- a/backends/x86_64_init.c +++ b/backends/x86_64_init.c @@ -1,5 +1,6 @@ /* Initialization of x86-64 specific backend library. Copyright (C) 2002-2009, 2013 Red Hat, Inc. + Copyright (C) H.J. Lu , 2015. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -38,6 +39,8 @@ /* This defines the common reloc hooks based on x86_64_reloc.def. */ #include "common-reloc.c" +extern __typeof (EBLHOOK (core_note)) x32_core_note attribute_hidden; + const char * x86_64_init (elf, machine, eh, ehlen) Elf *elf __attribute__ ((unused)); @@ -53,7 +56,10 @@ x86_64_init (elf, machine, eh, ehlen) eh->name = "AMD x86-64"; x86_64_init_reloc (eh); HOOK (eh, reloc_simple_type); - HOOK (eh, core_note); + if (eh->class == ELFCLASS32) + eh->core_note = x32_core_note; + else + HOOK (eh, core_note); HOOK (eh, return_value_location); HOOK (eh, register_info); HOOK (eh, syscall_abi); -- cgit v1.2.3