Back to index

cell-binutils  2.17cvs20070401
avr.h
Go to the documentation of this file.
00001 /* AVR ELF support for BFD.
00002    Copyright 1999, 2000, 2004, 2006 Free Software Foundation, Inc.
00003    Contributed by Denis Chertykov <denisc@overta.ru>
00004 
00005    This file is part of BFD, the Binary File Descriptor library.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program; if not, write to the Free Software Foundation, Inc.,
00019    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00020 
00021 #ifndef _ELF_AVR_H
00022 #define _ELF_AVR_H
00023 
00024 #include "elf/reloc-macros.h"
00025 
00026 /* Processor specific flags for the ELF header e_flags field.  */
00027 #define EF_AVR_MACH 0xf
00028 
00029 /* If bit #7 is set, it is assumed that the elf file uses local symbols
00030    as reference for the relocations so that linker relaxation is possible.  */
00031 #define EF_AVR_LINKRELAX_PREPARED 0x80
00032 
00033 #define E_AVR_MACH_AVR1 1
00034 #define E_AVR_MACH_AVR2 2
00035 #define E_AVR_MACH_AVR3 3
00036 #define E_AVR_MACH_AVR4 4
00037 #define E_AVR_MACH_AVR5 5
00038 #define E_AVR_MACH_AVR6 6 
00039 
00040 /* Relocations.  */
00041 START_RELOC_NUMBERS (elf_avr_reloc_type)
00042      RELOC_NUMBER (R_AVR_NONE,                   0)
00043      RELOC_NUMBER (R_AVR_32,                     1)
00044      RELOC_NUMBER (R_AVR_7_PCREL,         2)
00045      RELOC_NUMBER (R_AVR_13_PCREL,        3)
00046      RELOC_NUMBER (R_AVR_16,                     4)
00047      RELOC_NUMBER (R_AVR_16_PM,           5)
00048      RELOC_NUMBER (R_AVR_LO8_LDI,         6)
00049      RELOC_NUMBER (R_AVR_HI8_LDI,         7)
00050      RELOC_NUMBER (R_AVR_HH8_LDI,         8)
00051      RELOC_NUMBER (R_AVR_LO8_LDI_NEG,            9)
00052      RELOC_NUMBER (R_AVR_HI8_LDI_NEG,            10)
00053      RELOC_NUMBER (R_AVR_HH8_LDI_NEG,            11)
00054      RELOC_NUMBER (R_AVR_LO8_LDI_PM,             12)
00055      RELOC_NUMBER (R_AVR_HI8_LDI_PM,             13)
00056      RELOC_NUMBER (R_AVR_HH8_LDI_PM,             14)
00057      RELOC_NUMBER (R_AVR_LO8_LDI_PM_NEG,       15)
00058      RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG,       16)
00059      RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG,       17)
00060      RELOC_NUMBER (R_AVR_CALL,                   18)
00061      RELOC_NUMBER (R_AVR_LDI,                  19)
00062      RELOC_NUMBER (R_AVR_6,                    20)
00063      RELOC_NUMBER (R_AVR_6_ADIW,               21)
00064      RELOC_NUMBER (R_AVR_MS8_LDI,              22)
00065      RELOC_NUMBER (R_AVR_MS8_LDI_NEG,          23)
00066      RELOC_NUMBER (R_AVR_LO8_LDI_GS,             24)
00067      RELOC_NUMBER (R_AVR_HI8_LDI_GS,             25)
00068 END_RELOC_NUMBERS (R_AVR_max)
00069 
00070 #endif /* _ELF_AVR_H */