arch/hexagon/include/asm/elf.h
Source file repositories/reference/linux-study-clean/arch/hexagon/include/asm/elf.h
File Facts
- System
- Linux kernel
- Corpus path
arch/hexagon/include/asm/elf.h- Extension
.h- Size
- 5758 bytes
- Lines
- 217
- Domain
- Architecture Layer
- Bucket
- arch/hexagon
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/ptrace.hasm/user.hlinux/elf-em.h
Detected Declarations
struct elf32_hdrstruct linux_binprm
Annotated Snippet
#ifndef __ASM_ELF_H
#define __ASM_ELF_H
#include <asm/ptrace.h>
#include <asm/user.h>
#include <linux/elf-em.h>
struct elf32_hdr;
/*
* ELF header e_flags defines.
*/
/* should have stuff like "CPU type" and maybe "ABI version", etc */
/* Hexagon relocations */
/* V2 */
#define R_HEXAGON_NONE 0
#define R_HEXAGON_B22_PCREL 1
#define R_HEXAGON_B15_PCREL 2
#define R_HEXAGON_B7_PCREL 3
#define R_HEXAGON_LO16 4
#define R_HEXAGON_HI16 5
#define R_HEXAGON_32 6
#define R_HEXAGON_16 7
#define R_HEXAGON_8 8
#define R_HEXAGON_GPREL16_0 9
#define R_HEXAGON_GPREL16_1 10
#define R_HEXAGON_GPREL16_2 11
#define R_HEXAGON_GPREL16_3 12
#define R_HEXAGON_HL16 13
/* V3 */
#define R_HEXAGON_B13_PCREL 14
/* V4 */
#define R_HEXAGON_B9_PCREL 15
/* V4 (extenders) */
#define R_HEXAGON_B32_PCREL_X 16
#define R_HEXAGON_32_6_X 17
/* V4 (extended) */
#define R_HEXAGON_B22_PCREL_X 18
#define R_HEXAGON_B15_PCREL_X 19
#define R_HEXAGON_B13_PCREL_X 20
#define R_HEXAGON_B9_PCREL_X 21
#define R_HEXAGON_B7_PCREL_X 22
#define R_HEXAGON_16_X 23
#define R_HEXAGON_12_X 24
#define R_HEXAGON_11_X 25
#define R_HEXAGON_10_X 26
#define R_HEXAGON_9_X 27
#define R_HEXAGON_8_X 28
#define R_HEXAGON_7_X 29
#define R_HEXAGON_6_X 30
/* V2 PIC */
#define R_HEXAGON_32_PCREL 31
#define R_HEXAGON_COPY 32
#define R_HEXAGON_GLOB_DAT 33
#define R_HEXAGON_JMP_SLOT 34
#define R_HEXAGON_RELATIVE 35
#define R_HEXAGON_PLT_B22_PCREL 36
#define R_HEXAGON_GOTOFF_LO16 37
#define R_HEXAGON_GOTOFF_HI16 38
#define R_HEXAGON_GOTOFF_32 39
#define R_HEXAGON_GOT_LO16 40
#define R_HEXAGON_GOT_HI16 41
#define R_HEXAGON_GOT_32 42
#define R_HEXAGON_GOT_16 43
/*
* ELF register definitions..
*/
typedef unsigned long elf_greg_t;
typedef struct user_regs_struct elf_gregset_t;
#define ELF_NGREG (sizeof(elf_gregset_t)/sizeof(unsigned long))
/* Placeholder */
typedef unsigned long elf_fpregset_t;
/*
* Bypass the whole "regsets" thing for now and use the define.
*/
#if CONFIG_HEXAGON_ARCH_VERSION >= 4
#define CS_COPYREGS(DEST,REGS) \
do {\
DEST.cs0 = REGS->cs0;\
DEST.cs1 = REGS->cs1;\
} while (0)
#else
#define CS_COPYREGS(DEST,REGS)
Annotation
- Immediate include surface: `asm/ptrace.h`, `asm/user.h`, `linux/elf-em.h`.
- Detected declarations: `struct elf32_hdr`, `struct linux_binprm`.
- Atlas domain: Architecture Layer / arch/hexagon.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.