diff options
| author | Ley Foon Tan <lftan@altera.com> | 2014-11-06 02:19:55 -0500 |
|---|---|---|
| committer | Ley Foon Tan <lftan@altera.com> | 2014-12-07 23:55:58 -0500 |
| commit | 19f4c6b5afb92d405009cb8801bde3edc9205dc0 (patch) | |
| tree | 9d7aeed263ea1297ffcb8dc8fdaa5ca4c4b4c3a7 /arch/nios2/include/uapi | |
| parent | 4fdace8d4f8bee9ba163646e8530394f9c36e67e (diff) | |
nios2: ELF definitions
This patch adds definitions for the ELF format
Signed-off-by: Ley Foon Tan <lftan@altera.com>
Diffstat (limited to 'arch/nios2/include/uapi')
| -rw-r--r-- | arch/nios2/include/uapi/asm/elf.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/arch/nios2/include/uapi/asm/elf.h b/arch/nios2/include/uapi/asm/elf.h new file mode 100644 index 000000000000..a5b91ae5cf56 --- /dev/null +++ b/arch/nios2/include/uapi/asm/elf.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | |||
| 19 | |||
| 20 | #ifndef _UAPI_ASM_NIOS2_ELF_H | ||
| 21 | #define _UAPI_ASM_NIOS2_ELF_H | ||
| 22 | |||
| 23 | #include <linux/ptrace.h> | ||
| 24 | |||
| 25 | /* Relocation types */ | ||
| 26 | #define R_NIOS2_NONE 0 | ||
| 27 | #define R_NIOS2_S16 1 | ||
| 28 | #define R_NIOS2_U16 2 | ||
| 29 | #define R_NIOS2_PCREL16 3 | ||
| 30 | #define R_NIOS2_CALL26 4 | ||
| 31 | #define R_NIOS2_IMM5 5 | ||
| 32 | #define R_NIOS2_CACHE_OPX 6 | ||
| 33 | #define R_NIOS2_IMM6 7 | ||
| 34 | #define R_NIOS2_IMM8 8 | ||
| 35 | #define R_NIOS2_HI16 9 | ||
| 36 | #define R_NIOS2_LO16 10 | ||
| 37 | #define R_NIOS2_HIADJ16 11 | ||
| 38 | #define R_NIOS2_BFD_RELOC_32 12 | ||
| 39 | #define R_NIOS2_BFD_RELOC_16 13 | ||
| 40 | #define R_NIOS2_BFD_RELOC_8 14 | ||
| 41 | #define R_NIOS2_GPREL 15 | ||
| 42 | #define R_NIOS2_GNU_VTINHERIT 16 | ||
| 43 | #define R_NIOS2_GNU_VTENTRY 17 | ||
| 44 | #define R_NIOS2_UJMP 18 | ||
| 45 | #define R_NIOS2_CJMP 19 | ||
| 46 | #define R_NIOS2_CALLR 20 | ||
| 47 | #define R_NIOS2_ALIGN 21 | ||
| 48 | /* Keep this the last entry. */ | ||
| 49 | #define R_NIOS2_NUM 22 | ||
| 50 | |||
| 51 | typedef unsigned long elf_greg_t; | ||
| 52 | |||
| 53 | #define ELF_NGREG \ | ||
| 54 | ((sizeof(struct pt_regs) + sizeof(struct switch_stack)) / \ | ||
| 55 | sizeof(elf_greg_t)) | ||
| 56 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
| 57 | |||
| 58 | typedef unsigned long elf_fpregset_t; | ||
| 59 | |||
| 60 | /* | ||
| 61 | * These are used to set parameters in the core dumps. | ||
| 62 | */ | ||
| 63 | #define ELF_CLASS ELFCLASS32 | ||
| 64 | #define ELF_DATA ELFDATA2LSB | ||
| 65 | #define ELF_ARCH EM_ALTERA_NIOS2 | ||
| 66 | |||
| 67 | #endif /* _UAPI_ASM_NIOS2_ELF_H */ | ||
