1b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Initialization of Alpha specific backend library. 2d76bd7a2839e9ab79abf75948b646bf52a8695e3Roland McGrath Copyright (C) 2002-2011 Red Hat, Inc. 3de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard This file is part of elfutils. 4b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Written by Ulrich Drepper <drepper@redhat.com>, 2002. 5b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 6de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard This file is free software; you can redistribute it and/or modify 7de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard it under the terms of either 8361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper 9de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard * the GNU Lesser General Public License as published by the Free 10de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard Software Foundation; either version 3 of the License, or (at 11de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard your option) any later version 12de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard 13de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard or 14de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard 15de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard * the GNU General Public License as published by the Free 16de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard Software Foundation; either version 2 of the License, or (at 17de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard your option) any later version 18de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard 19de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard or both in parallel, as here. 20de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard 21de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard elfutils is distributed in the hope that it will be useful, but 22361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper WITHOUT ANY WARRANTY; without even the implied warranty of 23361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper General Public License for more details. 25361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper 26de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard You should have received copies of the GNU General Public License and 27de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard the GNU Lesser General Public License along with this program. If 28de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard not, see <http://www.gnu.org/licenses/>. */ 29b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 30b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#ifdef HAVE_CONFIG_H 31b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper# include <config.h> 32b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#endif 33b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 34cd60ea83050d9fb48c3204005f475df460f433b6Roland McGrath#define BACKEND alpha_ 35cd60ea83050d9fb48c3204005f475df460f433b6Roland McGrath#define RELOC_PREFIX R_ALPHA_ 36cd60ea83050d9fb48c3204005f475df460f433b6Roland McGrath#include "libebl_CPU.h" 37cd60ea83050d9fb48c3204005f475df460f433b6Roland McGrath 38cd60ea83050d9fb48c3204005f475df460f433b6Roland McGrath/* This defines the common reloc hooks based on alpha_reloc.def. */ 39cd60ea83050d9fb48c3204005f475df460f433b6Roland McGrath#include "common-reloc.c" 40b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 41b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 42b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperconst char * 43aa1c2ca808a267a5a3c372de5461c1f67f9a8869Chih-Hung Hsiehalpha_init (Elf *elf __attribute__ ((unused)), 44aa1c2ca808a267a5a3c372de5461c1f67f9a8869Chih-Hung Hsieh GElf_Half machine __attribute__ ((unused)), 45aa1c2ca808a267a5a3c372de5461c1f67f9a8869Chih-Hung Hsieh Ebl *eh, 46aa1c2ca808a267a5a3c372de5461c1f67f9a8869Chih-Hung Hsieh size_t ehlen) 47b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 48b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Check whether the Elf_BH object has a sufficent size. */ 49b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper if (ehlen < sizeof (Ebl)) 50b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper return NULL; 51b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 52b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* We handle it. */ 53b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper eh->name = "Alpha"; 54cd60ea83050d9fb48c3204005f475df460f433b6Roland McGrath alpha_init_reloc (eh); 55f47ba53e758a954c72f820e169079aa767d9f96cRoland McGrath HOOK (eh, dynamic_tag_name); 56f47ba53e758a954c72f820e169079aa767d9f96cRoland McGrath HOOK (eh, dynamic_tag_check); 57f47ba53e758a954c72f820e169079aa767d9f96cRoland McGrath HOOK (eh, reloc_simple_type); 58f47ba53e758a954c72f820e169079aa767d9f96cRoland McGrath HOOK (eh, return_value_location); 592be0291b2cc06fc253c73a1564b126580c8f5ea2Roland McGrath HOOK (eh, machine_section_flag_check); 6060982e6e9da662cf5c9d12c6d095738a9b2dcf68Roland McGrath HOOK (eh, check_special_section); 61d76bd7a2839e9ab79abf75948b646bf52a8695e3Roland McGrath HOOK (eh, check_special_symbol); 62a062b6bcadd1565d360acf640f9d4c159b2270eaMark Wielaard HOOK (eh, check_st_other_bits); 63cb6d865011ad98a8ac2018f072f396a2268739caRoland McGrath HOOK (eh, register_info); 64cb6d865011ad98a8ac2018f072f396a2268739caRoland McGrath HOOK (eh, core_note); 65059c83e5db89955913a39fe6705acca571c32c3fRoland McGrath HOOK (eh, auxv_info); 6628ed895fdc303b2a793506bb1fcdd35d5fd14e70Ulrich Drepper eh->sysvhash_entrysize = sizeof (Elf64_Xword); 67b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 68b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper return MODVERSION; 69b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper} 70