X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=backends%2Fx86_64_init.c;h=cfd0158ca4ebe7d733e2ee6f49a5cef8f3a4056e;hb=82c3b58b54026d061a4d81ad95f3023d5d883ab2;hp=b885558b0b64738dffae44b16415c0b7cf2b617d;hpb=a286dd013ef8d46edf013efc0908822a59d8ac81;p=platform%2Fupstream%2Felfutils.git diff --git a/backends/x86_64_init.c b/backends/x86_64_init.c index b885558..cfd0158 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,12 +39,13 @@ /* 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)); - GElf_Half machine __attribute__ ((unused)); - Ebl *eh; - size_t ehlen; +x86_64_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) { /* Check whether the Elf_BH object has a sufficent size. */ if (ehlen < sizeof (Ebl)) @@ -53,7 +55,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);