diff options
author | H.J. Lu <[email protected]> | 2015-03-12 14:51:42 -0700 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2015-04-01 20:45:13 +0200 |
commit | 28ce4e89d34a5cdb6265cf477e535326271f9abe (patch) | |
tree | 8cd6584fe98c23ba924643db4adbedef6dbff20e /backends/x86_64_init.c | |
parent | 7f617347794f7d57f69d08f38c00f3f6ad221a56 (diff) |
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 <[email protected]>
Diffstat (limited to 'backends/x86_64_init.c')
-rw-r--r-- | backends/x86_64_init.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <[email protected]>, 2015. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 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); |