168673Sobrien/* AVR ELF support for BFD. 2218822Sdim Copyright 1999, 2000, 2004, 2006 Free Software Foundation, Inc. 368673Sobrien Contributed by Denis Chertykov <denisc@overta.ru> 468673Sobrien 5218822Sdim This file is part of BFD, the Binary File Descriptor library. 668673Sobrien 7218822Sdim This program is free software; you can redistribute it and/or modify 8218822Sdim it under the terms of the GNU General Public License as published by 9218822Sdim the Free Software Foundation; either version 2 of the License, or 10218822Sdim (at your option) any later version. 1168673Sobrien 12218822Sdim This program is distributed in the hope that it will be useful, 13218822Sdim but WITHOUT ANY WARRANTY; without even the implied warranty of 14218822Sdim MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15218822Sdim GNU General Public License for more details. 1668673Sobrien 17218822Sdim You should have received a copy of the GNU General Public License 18218822Sdim along with this program; if not, write to the Free Software Foundation, Inc., 19218822Sdim 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 2068673Sobrien 2168673Sobrien#ifndef _ELF_AVR_H 2268673Sobrien#define _ELF_AVR_H 2368673Sobrien 2468673Sobrien#include "elf/reloc-macros.h" 2568673Sobrien 2668673Sobrien/* Processor specific flags for the ELF header e_flags field. */ 2768673Sobrien#define EF_AVR_MACH 0xf 2868673Sobrien 29218822Sdim/* If bit #7 is set, it is assumed that the elf file uses local symbols 30218822Sdim as reference for the relocations so that linker relaxation is possible. */ 31218822Sdim#define EF_AVR_LINKRELAX_PREPARED 0x80 32218822Sdim 3368673Sobrien#define E_AVR_MACH_AVR1 1 3468673Sobrien#define E_AVR_MACH_AVR2 2 3568673Sobrien#define E_AVR_MACH_AVR3 3 3668673Sobrien#define E_AVR_MACH_AVR4 4 3777298Sobrien#define E_AVR_MACH_AVR5 5 38218822Sdim#define E_AVR_MACH_AVR6 6 3968673Sobrien 4068673Sobrien/* Relocations. */ 4168673SobrienSTART_RELOC_NUMBERS (elf_avr_reloc_type) 4268673Sobrien RELOC_NUMBER (R_AVR_NONE, 0) 4368673Sobrien RELOC_NUMBER (R_AVR_32, 1) 4468673Sobrien RELOC_NUMBER (R_AVR_7_PCREL, 2) 4568673Sobrien RELOC_NUMBER (R_AVR_13_PCREL, 3) 4668673Sobrien RELOC_NUMBER (R_AVR_16, 4) 4768673Sobrien RELOC_NUMBER (R_AVR_16_PM, 5) 4868673Sobrien RELOC_NUMBER (R_AVR_LO8_LDI, 6) 4968673Sobrien RELOC_NUMBER (R_AVR_HI8_LDI, 7) 5068673Sobrien RELOC_NUMBER (R_AVR_HH8_LDI, 8) 5168673Sobrien RELOC_NUMBER (R_AVR_LO8_LDI_NEG, 9) 5268673Sobrien RELOC_NUMBER (R_AVR_HI8_LDI_NEG, 10) 5368673Sobrien RELOC_NUMBER (R_AVR_HH8_LDI_NEG, 11) 5468673Sobrien RELOC_NUMBER (R_AVR_LO8_LDI_PM, 12) 5568673Sobrien RELOC_NUMBER (R_AVR_HI8_LDI_PM, 13) 5668673Sobrien RELOC_NUMBER (R_AVR_HH8_LDI_PM, 14) 5768673Sobrien RELOC_NUMBER (R_AVR_LO8_LDI_PM_NEG, 15) 5868673Sobrien RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG, 16) 5968673Sobrien RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG, 17) 6068673Sobrien RELOC_NUMBER (R_AVR_CALL, 18) 61218822Sdim RELOC_NUMBER (R_AVR_LDI, 19) 62218822Sdim RELOC_NUMBER (R_AVR_6, 20) 63218822Sdim RELOC_NUMBER (R_AVR_6_ADIW, 21) 64218822Sdim RELOC_NUMBER (R_AVR_MS8_LDI, 22) 65218822Sdim RELOC_NUMBER (R_AVR_MS8_LDI_NEG, 23) 66218822Sdim RELOC_NUMBER (R_AVR_LO8_LDI_GS, 24) 67218822Sdim RELOC_NUMBER (R_AVR_HI8_LDI_GS, 25) 6877298SobrienEND_RELOC_NUMBERS (R_AVR_max) 6968673Sobrien 7068673Sobrien#endif /* _ELF_AVR_H */ 71