162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * This program is free software; you can redistribute it and/or modify
662306a36Sopenharmony_ci * it under the terms of the GNU General Public License as published by
762306a36Sopenharmony_ci * the Free Software Foundation; either version 2 of the License, or
862306a36Sopenharmony_ci * (at your option) any later version.
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * This program is distributed in the hope that it will be useful,
1162306a36Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of
1262306a36Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1362306a36Sopenharmony_ci * GNU General Public License for more details.
1462306a36Sopenharmony_ci *
1562306a36Sopenharmony_ci * You should have received a copy of the GNU General Public License
1662306a36Sopenharmony_ci * along with this program.  If not, see <http://www.gnu.org/licenses/>.
1762306a36Sopenharmony_ci *
1862306a36Sopenharmony_ci */
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci#ifndef _UAPI_ASM_NIOS2_ELF_H
2262306a36Sopenharmony_ci#define _UAPI_ASM_NIOS2_ELF_H
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#include <linux/ptrace.h>
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci/* Relocation types */
2762306a36Sopenharmony_ci#define R_NIOS2_NONE		0
2862306a36Sopenharmony_ci#define R_NIOS2_S16		1
2962306a36Sopenharmony_ci#define R_NIOS2_U16		2
3062306a36Sopenharmony_ci#define R_NIOS2_PCREL16		3
3162306a36Sopenharmony_ci#define R_NIOS2_CALL26		4
3262306a36Sopenharmony_ci#define R_NIOS2_IMM5		5
3362306a36Sopenharmony_ci#define R_NIOS2_CACHE_OPX	6
3462306a36Sopenharmony_ci#define R_NIOS2_IMM6		7
3562306a36Sopenharmony_ci#define R_NIOS2_IMM8		8
3662306a36Sopenharmony_ci#define R_NIOS2_HI16		9
3762306a36Sopenharmony_ci#define R_NIOS2_LO16		10
3862306a36Sopenharmony_ci#define R_NIOS2_HIADJ16		11
3962306a36Sopenharmony_ci#define R_NIOS2_BFD_RELOC_32	12
4062306a36Sopenharmony_ci#define R_NIOS2_BFD_RELOC_16	13
4162306a36Sopenharmony_ci#define R_NIOS2_BFD_RELOC_8	14
4262306a36Sopenharmony_ci#define R_NIOS2_GPREL		15
4362306a36Sopenharmony_ci#define R_NIOS2_GNU_VTINHERIT	16
4462306a36Sopenharmony_ci#define R_NIOS2_GNU_VTENTRY	17
4562306a36Sopenharmony_ci#define R_NIOS2_UJMP		18
4662306a36Sopenharmony_ci#define R_NIOS2_CJMP		19
4762306a36Sopenharmony_ci#define R_NIOS2_CALLR		20
4862306a36Sopenharmony_ci#define R_NIOS2_ALIGN		21
4962306a36Sopenharmony_ci/* Keep this the last entry.  */
5062306a36Sopenharmony_ci#define R_NIOS2_NUM		22
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_citypedef unsigned long elf_greg_t;
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci#define ELF_NGREG		49
5562306a36Sopenharmony_citypedef elf_greg_t elf_gregset_t[ELF_NGREG];
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_citypedef unsigned long elf_fpregset_t;
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci/*
6062306a36Sopenharmony_ci * These are used to set parameters in the core dumps.
6162306a36Sopenharmony_ci */
6262306a36Sopenharmony_ci#define ELF_CLASS	ELFCLASS32
6362306a36Sopenharmony_ci#define ELF_DATA	ELFDATA2LSB
6462306a36Sopenharmony_ci#define ELF_ARCH	EM_ALTERA_NIOS2
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci#endif /* _UAPI_ASM_NIOS2_ELF_H */
67