arch/mips/boot/tools/relocs.h
Source file repositories/reference/linux-study-clean/arch/mips/boot/tools/relocs.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/boot/tools/relocs.h- Extension
.h- Size
- 967 bytes
- Lines
- 54
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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.
Dependency Surface
stdio.hstdarg.hstdlib.hstdint.hinttypes.hstring.herrno.hunistd.helf.hbyteswap.hendian.hregex.h
Detected Declarations
enum symtype
Annotated Snippet
#ifndef RELOCS_H
#define RELOCS_H
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <elf.h>
#include <byteswap.h>
#define USE_BSD
#include <endian.h>
#include <regex.h>
void die(char *fmt, ...);
/*
* Introduced for MIPSr6
*/
#ifndef R_MIPS_PC21_S2
#define R_MIPS_PC21_S2 60
#endif
#ifndef R_MIPS_PC26_S2
#define R_MIPS_PC26_S2 61
#endif
/*
* GNU extension that available in glibc only since 2023, not available on musl.
*/
#ifndef R_MIPS_PC32
#define R_MIPS_PC32 248
#endif
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
enum symtype {
S_ABS,
S_REL,
S_SEG,
S_LIN,
S_NSYMTYPES
};
void process_32(FILE *fp, int as_text, int as_bin,
int show_reloc_info, int keep_relocs);
void process_64(FILE *fp, int as_text, int as_bin,
int show_reloc_info, int keep_relocs);
#endif /* RELOCS_H */
Annotation
- Immediate include surface: `stdio.h`, `stdarg.h`, `stdlib.h`, `stdint.h`, `inttypes.h`, `string.h`, `errno.h`, `unistd.h`.
- Detected declarations: `enum symtype`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.