arch/loongarch/kernel/vmlinux.lds.S
Source file repositories/reference/linux-study-clean/arch/loongarch/kernel/vmlinux.lds.S
File Facts
- System
- Linux kernel
- Corpus path
arch/loongarch/kernel/vmlinux.lds.S- Extension
.S- Size
- 3369 bytes
- Lines
- 184
- Domain
- Architecture Layer
- Bucket
- arch/loongarch
- Inferred role
- Architecture Layer: arch/loongarch
- Status
- atlas-only
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
linux/sizes.hasm/asm-offsets.hasm/thread_info.hasm/orc_lookup.hasm-generic/vmlinux.lds.himage-vars.h
Detected Declarations
function RW_DATA
Annotated Snippet
#include <linux/sizes.h>
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
#include <asm/orc_lookup.h>
#define PAGE_SIZE _PAGE_SIZE
#define RO_EXCEPTION_TABLE_ALIGN 4
#ifdef CONFIG_32BIT
#define PHYSADDR_MASK 0x1fffffff /* 29-bit */
#else
#define PHYSADDR_MASK 0xffffffffffff /* 48-bit */
#endif
/*
* Put .bss..swapper_pg_dir as the first thing in .bss. This will
* ensure that it has .bss alignment (64K).
*/
#define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)
#include <asm-generic/vmlinux.lds.h>
#include "image-vars.h"
/*
* Max avaliable Page Size is 64K, so we set SectionAlignment
* field of EFI application to 64K.
*/
PECOFF_FILE_ALIGN = 0x200;
PECOFF_SEGMENT_ALIGN = 0x10000;
OUTPUT_ARCH(loongarch)
ENTRY(kernel_entry)
PHDRS {
text PT_LOAD FLAGS(7); /* RWX */
note PT_NOTE FLAGS(4); /* R__ */
}
jiffies = jiffies_64;
SECTIONS
{
. = VMLINUX_LOAD_ADDRESS;
_text = .;
HEAD_TEXT_SECTION
. = ALIGN(PECOFF_SEGMENT_ALIGN);
_stext = .;
.text : {
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
IRQENTRY_TEXT
SOFTIRQENTRY_TEXT
*(.fixup)
*(.gnu.warning)
} :text = 0
. = ALIGN(PECOFF_SEGMENT_ALIGN);
_etext = .;
. = ALIGN(PECOFF_SEGMENT_ALIGN);
__init_begin = .;
__inittext_begin = .;
INIT_TEXT_SECTION(PAGE_SIZE)
.exit.text : {
EXIT_TEXT
}
Annotation
- Immediate include surface: `linux/sizes.h`, `asm/asm-offsets.h`, `asm/thread_info.h`, `asm/orc_lookup.h`, `asm-generic/vmlinux.lds.h`, `image-vars.h`.
- Detected declarations: `function RW_DATA`.
- Atlas domain: Architecture Layer / arch/loongarch.
- Implementation status: atlas-only.
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.