103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes/* TILEGX-specific symbolic name handling. 203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes Copyright (C) 2012 Tilera Corporation 303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes This file is part of elfutils. 403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes This file is free software; you can redistribute it and/or modify 603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes it under the terms of either 703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes * the GNU Lesser General Public License as published by the Free 903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes Software Foundation; either version 3 of the License, or (at 1003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes your option) any later version 1103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 1203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes or 1303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 1403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes * the GNU General Public License as published by the Free 1503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes Software Foundation; either version 2 of the License, or (at 1603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes your option) any later version 1703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 1803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes or both in parallel, as here. 1903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 2003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes elfutils is distributed in the hope that it will be useful, but 2103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes WITHOUT ANY WARRANTY; without even the implied warranty of 2203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes General Public License for more details. 2403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 2503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes You should have received copies of the GNU General Public License and 2603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes the GNU Lesser General Public License along with this program. If 2703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes not, see <http://www.gnu.org/licenses/>. */ 2803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 2903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 3003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#ifdef HAVE_CONFIG_H 3103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes# include <config.h> 3203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#endif 3303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 3403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include <elf.h> 3503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include <stddef.h> 3603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 3703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#define BACKEND tilegx_ 3803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes#include "libebl_CPU.h" 3903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes 4003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes/* Check for the simple reloc types. */ 4103333823c75a1c1887e923828113a1b0fd12020cElliott HughesElf_Type 4203333823c75a1c1887e923828113a1b0fd12020cElliott Hughestilegx_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) 4303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes{ 4403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes switch (type) 4503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes { 4603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes case R_TILEGX_64: 4703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes return ELF_T_SXWORD; 4803333823c75a1c1887e923828113a1b0fd12020cElliott Hughes case R_TILEGX_32: 4903333823c75a1c1887e923828113a1b0fd12020cElliott Hughes return ELF_T_SWORD; 5003333823c75a1c1887e923828113a1b0fd12020cElliott Hughes case R_TILEGX_16: 5103333823c75a1c1887e923828113a1b0fd12020cElliott Hughes return ELF_T_HALF; 5203333823c75a1c1887e923828113a1b0fd12020cElliott Hughes case R_TILEGX_8: 5303333823c75a1c1887e923828113a1b0fd12020cElliott Hughes return ELF_T_BYTE; 5403333823c75a1c1887e923828113a1b0fd12020cElliott Hughes default: 5503333823c75a1c1887e923828113a1b0fd12020cElliott Hughes return ELF_T_NUM; 5603333823c75a1c1887e923828113a1b0fd12020cElliott Hughes } 5703333823c75a1c1887e923828113a1b0fd12020cElliott Hughes} 58