Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
vmlinux.lds.h File Reference

Go to the source code of this file.

Macros

#define LOAD_OFFSET   0
 
#define VMLINUX_SYMBOL(sym)   sym
 
#define ALIGN_FUNCTION()   . = ALIGN(8)
 
#define STRUCT_ALIGNMENT   32
 
#define STRUCT_ALIGN()   . = ALIGN(STRUCT_ALIGNMENT)
 
#define DEV_KEEP(sec)
 
#define DEV_DISCARD(sec)   *(.dev##sec)
 
#define CPU_KEEP(sec)
 
#define CPU_DISCARD(sec)   *(.cpu##sec)
 
#define MEM_KEEP(sec)
 
#define MEM_DISCARD(sec)   *(.mem##sec)
 
#define MCOUNT_REC()
 
#define LIKELY_PROFILE()
 
#define BRANCH_PROFILE()
 
#define FTRACE_EVENTS()
 
#define TRACE_PRINTKS()
 
#define TRACE_SYSCALLS()
 
#define KERNEL_DTB()
 
#define DATA_DATA
 
#define NOSAVE_DATA
 
#define PAGE_ALIGNED_DATA(page_align)
 
#define READ_MOSTLY_DATA(align)
 
#define CACHELINE_ALIGNED_DATA(align)
 
#define INIT_TASK_DATA(align)
 
#define RO_DATA_SECTION(align)
 
#define RODATA   RO_DATA_SECTION(4096)
 
#define RO_DATA(align)   RO_DATA_SECTION(align)
 
#define SECURITY_INIT
 
#define TEXT_TEXT
 
#define SCHED_TEXT
 
#define LOCK_TEXT
 
#define KPROBES_TEXT
 
#define ENTRY_TEXT
 
#define IRQENTRY_TEXT
 
#define HEAD_TEXT   *(.head.text)
 
#define HEAD_TEXT_SECTION
 
#define EXCEPTION_TABLE(align)
 
#define INIT_TASK_DATA_SECTION(align)
 
#define KERNEL_CTORS()
 
#define INIT_DATA
 
#define INIT_TEXT
 
#define EXIT_DATA
 
#define EXIT_TEXT
 
#define EXIT_CALL   *(.exitcall.exit)
 
#define SBSS(sbss_align)
 
#define BSS_FIRST_SECTIONS
 
#define BSS(bss_align)
 
#define DWARF_DEBUG
 
#define STABS_DEBUG
 
#define BUG_TABLE
 
#define TRACEDATA
 
#define NOTES
 
#define INIT_SETUP(initsetup_align)
 
#define INIT_CALLS_LEVEL(level)
 
#define INIT_CALLS
 
#define CON_INITCALL
 
#define SECURITY_INITCALL
 
#define INIT_RAM_FS
 
#define DISCARDS
 
#define PERCPU_INPUT(cacheline)
 
#define PERCPU_VADDR(cacheline, vaddr, phdr)
 
#define PERCPU_SECTION(cacheline)
 
#define RW_DATA_SECTION(cacheline, pagealigned, inittask)
 
#define INIT_TEXT_SECTION(inittext_align)
 
#define INIT_DATA_SECTION(initsetup_align)
 
#define BSS_SECTION(sbss_align, bss_align, stop_align)
 

Macro Definition Documentation

#define ALIGN_FUNCTION ( )    . = ALIGN(8)

Definition at line 64 of file vmlinux.lds.h.

#define BRANCH_PROFILE ( )

Definition at line 123 of file vmlinux.lds.h.

#define BSS (   bss_align)
Value:
. = ALIGN(bss_align); \
.bss : AT(ADDR(.bss) - LOAD_OFFSET) { \
BSS_FIRST_SECTIONS \
*(.bss..page_aligned) \
*(.dynbss) \
*(.bss) \
*(COMMON) \
}

Definition at line 541 of file vmlinux.lds.h.

#define BSS_FIRST_SECTIONS

Definition at line 538 of file vmlinux.lds.h.

#define BSS_SECTION (   sbss_align,
  bss_align,
  stop_align 
)
Value:
. = ALIGN(sbss_align); \
VMLINUX_SYMBOL(__bss_start) = .; \
SBSS(sbss_align) \
BSS(bss_align) \
. = ALIGN(stop_align); \
VMLINUX_SYMBOL(__bss_stop) = .;

Definition at line 808 of file vmlinux.lds.h.

#define BUG_TABLE

Definition at line 600 of file vmlinux.lds.h.

#define CACHELINE_ALIGNED_DATA (   align)
Value:
. = ALIGN(align); \
*(.data..cacheline_aligned)

Definition at line 205 of file vmlinux.lds.h.

#define CON_INITCALL
Value:
VMLINUX_SYMBOL(__con_initcall_start) = .; \
*(.con_initcall.init) \
VMLINUX_SYMBOL(__con_initcall_end) = .;

Definition at line 647 of file vmlinux.lds.h.

#define CPU_DISCARD (   sec)    *(.cpu##sec)

Definition at line 90 of file vmlinux.lds.h.

#define CPU_KEEP (   sec)

Definition at line 89 of file vmlinux.lds.h.

#define DATA_DATA
Value:
*(.data) \
*(.ref.data) \
*(.data..shared_aligned) /* percpu related */ \
DEV_KEEP(init.data) \
DEV_KEEP(exit.data) \
CPU_KEEP(init.data) \
CPU_KEEP(exit.data) \
MEM_KEEP(init.data) \
MEM_KEEP(exit.data) \
*(.data.unlikely) \
*(__tracepoints) \
/* implement dynamic printk debug */ \
. = ALIGN(8); \
VMLINUX_SYMBOL(__start___jump_table) = .; \
*(__jump_table) \
VMLINUX_SYMBOL(__stop___jump_table) = .; \
. = ALIGN(8); \
VMLINUX_SYMBOL(__start___verbose) = .; \
*(__verbose) \
VMLINUX_SYMBOL(__stop___verbose) = .; \
LIKELY_PROFILE() \
BRANCH_PROFILE() \
TRACE_PRINTKS()

Definition at line 160 of file vmlinux.lds.h.

#define DEV_DISCARD (   sec)    *(.dev##sec)

Definition at line 82 of file vmlinux.lds.h.

#define DEV_KEEP (   sec)

Definition at line 81 of file vmlinux.lds.h.

#define DISCARDS
Value:
/DISCARD/ : { \
EXIT_TEXT \
EXIT_DATA \
EXIT_CALL \
*(.discard) \
*(.discard.*) \
}

Definition at line 677 of file vmlinux.lds.h.

#define DWARF_DEBUG
Value:
/* DWARF 1 */ \
.debug 0 : { *(.debug) } \
.line 0 : { *(.line) } \
/* GNU DWARF 1 extensions */ \
.debug_srcinfo 0 : { *(.debug_srcinfo) } \
.debug_sfnames 0 : { *(.debug_sfnames) } \
/* DWARF 1.1 and DWARF 2 */ \
.debug_aranges 0 : { *(.debug_aranges) } \
.debug_pubnames 0 : { *(.debug_pubnames) } \
/* DWARF 2 */ \
.debug_info 0 : { *(.debug_info \
.gnu.linkonce.wi.*) } \
.debug_abbrev 0 : { *(.debug_abbrev) } \
.debug_line 0 : { *(.debug_line) } \
.debug_frame 0 : { *(.debug_frame) } \
.debug_str 0 : { *(.debug_str) } \
.debug_loc 0 : { *(.debug_loc) } \
.debug_macinfo 0 : { *(.debug_macinfo) } \
/* SGI/MIPS DWARF 2 extensions */ \
.debug_weaknames 0 : { *(.debug_weaknames) } \
.debug_funcnames 0 : { *(.debug_funcnames) } \
.debug_typenames 0 : { *(.debug_typenames) } \
.debug_varnames 0 : { *(.debug_varnames) } \

Definition at line 556 of file vmlinux.lds.h.

#define ENTRY_TEXT
Value:
VMLINUX_SYMBOL(__entry_text_start) = .; \
*(.entry.text) \
VMLINUX_SYMBOL(__entry_text_end) = .;

Definition at line 429 of file vmlinux.lds.h.

#define EXCEPTION_TABLE (   align)
Value:
. = ALIGN(align); \
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___ex_table) = .; \
VMLINUX_SYMBOL(__stop___ex_table) = .; \
}

Definition at line 456 of file vmlinux.lds.h.

#define EXIT_CALL   *(.exitcall.exit)

Definition at line 519 of file vmlinux.lds.h.

#define EXIT_DATA
Value:
*(.exit.data) \
DEV_DISCARD(exit.data) \
DEV_DISCARD(exit.rodata) \
CPU_DISCARD(exit.data) \
CPU_DISCARD(exit.rodata) \
MEM_DISCARD(exit.data) \
MEM_DISCARD(exit.rodata)

Definition at line 504 of file vmlinux.lds.h.

#define EXIT_TEXT
Value:
*(.exit.text) \
DEV_DISCARD(exit.text) \
CPU_DISCARD(exit.text) \
MEM_DISCARD(exit.text)

Definition at line 513 of file vmlinux.lds.h.

#define FTRACE_EVENTS ( )

Definition at line 132 of file vmlinux.lds.h.

#define HEAD_TEXT   *(.head.text)

Definition at line 446 of file vmlinux.lds.h.

#define HEAD_TEXT_SECTION
Value:
.head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { \
HEAD_TEXT \
}

Definition at line 448 of file vmlinux.lds.h.

#define INIT_CALLS
Value:
VMLINUX_SYMBOL(__initcall_start) = .; \
*(.initcallearly.init) \
INIT_CALLS_LEVEL(1) \
INIT_CALLS_LEVEL(2) \
INIT_CALLS_LEVEL(3) \
INIT_CALLS_LEVEL(4) \
INIT_CALLS_LEVEL(5) \
INIT_CALLS_LEVEL(rootfs) \
INIT_CALLS_LEVEL(6) \
INIT_CALLS_LEVEL(7) \
VMLINUX_SYMBOL(__initcall_end) = .;

Definition at line 633 of file vmlinux.lds.h.

#define INIT_CALLS_LEVEL (   level)
Value:
*(.initcall##level##.init) \
*(.initcall##level##s.init) \

Definition at line 628 of file vmlinux.lds.h.

#define INIT_DATA
Value:
*(.init.data) \
DEV_DISCARD(init.data) \
CPU_DISCARD(init.data) \
MEM_DISCARD(init.data) \
KERNEL_CTORS() \
MCOUNT_REC() \
*(.init.rodata) \
TRACE_SYSCALLS() \
DEV_DISCARD(init.rodata) \
CPU_DISCARD(init.rodata) \
MEM_DISCARD(init.rodata) \
KERNEL_DTB()

Definition at line 483 of file vmlinux.lds.h.

#define INIT_DATA_SECTION (   initsetup_align)
Value:
.init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { \
INIT_SETUP(initsetup_align) \
INIT_CALLS \
CON_INITCALL \
SECURITY_INITCALL \
INIT_RAM_FS \
}

Definition at line 798 of file vmlinux.lds.h.

#define INIT_RAM_FS

Definition at line 665 of file vmlinux.lds.h.

#define INIT_SETUP (   initsetup_align)
Value:
. = ALIGN(initsetup_align); \
VMLINUX_SYMBOL(__setup_start) = .; \
*(.init.setup) \
VMLINUX_SYMBOL(__setup_end) = .;

Definition at line 622 of file vmlinux.lds.h.

#define INIT_TASK_DATA (   align)
Value:
. = ALIGN(align); \
*(.data..init_task)

Definition at line 209 of file vmlinux.lds.h.

#define INIT_TASK_DATA_SECTION (   align)
Value:
. = ALIGN(align); \
INIT_TASK_DATA(align) \
}

Definition at line 467 of file vmlinux.lds.h.

#define INIT_TEXT
Value:
*(.init.text) \
DEV_DISCARD(init.text) \
CPU_DISCARD(init.text) \
MEM_DISCARD(init.text)

Definition at line 498 of file vmlinux.lds.h.

#define INIT_TEXT_SECTION (   inittext_align)
Value:
. = ALIGN(inittext_align); \
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(_sinittext) = .; \
VMLINUX_SYMBOL(_einittext) = .; \
}

Definition at line 790 of file vmlinux.lds.h.

#define IRQENTRY_TEXT

Definition at line 442 of file vmlinux.lds.h.

#define KERNEL_CTORS ( )

Definition at line 479 of file vmlinux.lds.h.

#define KERNEL_DTB ( )
Value:
VMLINUX_SYMBOL(__dtb_start) = .; \
*(.dtb.init.rodata) \
VMLINUX_SYMBOL(__dtb_end) = .;

Definition at line 153 of file vmlinux.lds.h.

#define KPROBES_TEXT
Value:
VMLINUX_SYMBOL(__kprobes_text_start) = .; \
*(.kprobes.text) \
VMLINUX_SYMBOL(__kprobes_text_end) = .;

Definition at line 423 of file vmlinux.lds.h.

#define LIKELY_PROFILE ( )

Definition at line 115 of file vmlinux.lds.h.

#define LOAD_OFFSET   0

Definition at line 52 of file vmlinux.lds.h.

#define LOCK_TEXT
Value:
VMLINUX_SYMBOL(__lock_text_start) = .; \
*(.spinlock.text) \
VMLINUX_SYMBOL(__lock_text_end) = .;

Definition at line 417 of file vmlinux.lds.h.

#define MCOUNT_REC ( )

Definition at line 107 of file vmlinux.lds.h.

#define MEM_DISCARD (   sec)    *(.mem##sec)

Definition at line 98 of file vmlinux.lds.h.

#define MEM_KEEP (   sec)

Definition at line 97 of file vmlinux.lds.h.

#define NOSAVE_DATA
Value:
VMLINUX_SYMBOL(__nosave_begin) = .; \
*(.data..nosave) \
. = ALIGN(PAGE_SIZE); \
VMLINUX_SYMBOL(__nosave_end) = .;

Definition at line 189 of file vmlinux.lds.h.

#define NOTES
Value:
.notes : AT(ADDR(.notes) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_notes) = .; \
*(.note.*) \
VMLINUX_SYMBOL(__stop_notes) = .; \
}

Definition at line 615 of file vmlinux.lds.h.

#define PAGE_ALIGNED_DATA (   page_align)
Value:
. = ALIGN(page_align); \
*(.data..page_aligned)

Definition at line 196 of file vmlinux.lds.h.

#define PERCPU_INPUT (   cacheline)
Value:
VMLINUX_SYMBOL(__per_cpu_start) = .; \
*(.data..percpu..first) \
. = ALIGN(PAGE_SIZE); \
*(.data..percpu..page_aligned) \
. = ALIGN(cacheline); \
*(.data..percpu..readmostly) \
. = ALIGN(cacheline); \
*(.data..percpu) \
*(.data..percpu..shared_aligned) \
VMLINUX_SYMBOL(__per_cpu_end) = .;

PERCPU_INPUT - the percpu input sections : cacheline size

The core percpu section names and core symbols which do not rely directly upon load addresses.

is used to align subsections to avoid false cacheline sharing between subsections for different purposes.

Definition at line 696 of file vmlinux.lds.h.

#define PERCPU_SECTION (   cacheline)
Value:
.data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__per_cpu_load) = .; \
PERCPU_INPUT(cacheline) \
}

PERCPU_SECTION - define output section for percpu area, simple version : cacheline size

Align to PAGE_SIZE and outputs output section for percpu area. This macro doesn't manipulate or and __per_cpu_load and __per_cpu_start will be identical.

This macro is equivalent to ALIGN(PAGE_SIZE); PERCPU_VADDR(,,) except that __per_cpu_load is defined as a relative symbol against .data..percpu which is required for relocatable x86_32 configuration.

Definition at line 752 of file vmlinux.lds.h.

#define PERCPU_VADDR (   cacheline,
  vaddr,
  phdr 
)
Value:
VMLINUX_SYMBOL(__per_cpu_load) = .; \
.data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
- LOAD_OFFSET) { \
PERCPU_INPUT(cacheline) \
} phdr \
. = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu);

PERCPU_VADDR - define output section for percpu area : cacheline size : explicit base address (optional) : destination PHDR (optional)

Macro which expands to output section for percpu area.

is used to align subsections to avoid false cacheline sharing between subsections for different purposes.

If is not blank, it specifies explicit base address and all percpu symbols will be offset from the given address. If blank, always equals + LOAD_OFFSET.

defines the output PHDR to use if not blank. Be warned that output PHDR is sticky. If is specified, the next output section in the linker script will go there too. should have a leading colon.

Note that this macros defines __per_cpu_load as an absolute symbol. If there is no need to put the percpu section at a predetermined address, use PERCPU_SECTION.

Definition at line 732 of file vmlinux.lds.h.

#define READ_MOSTLY_DATA (   align)
Value:
. = ALIGN(align); \
*(.data..read_mostly) \
. = ALIGN(align);

Definition at line 200 of file vmlinux.lds.h.

#define RO_DATA (   align)    RO_DATA_SECTION(align)

Definition at line 382 of file vmlinux.lds.h.

#define RO_DATA_SECTION (   align)

Definition at line 216 of file vmlinux.lds.h.

#define RODATA   RO_DATA_SECTION(4096)

Definition at line 381 of file vmlinux.lds.h.

#define RW_DATA_SECTION (   cacheline,
  pagealigned,
  inittask 
)
Value:
.data : AT(ADDR(.data) - LOAD_OFFSET) { \
INIT_TASK_DATA(inittask) \
PAGE_ALIGNED_DATA(pagealigned) \
CACHELINE_ALIGNED_DATA(cacheline) \
READ_MOSTLY_DATA(cacheline) \
DATA_DATA \
CONSTRUCTORS \
}

Definition at line 778 of file vmlinux.lds.h.

#define SBSS (   sbss_align)
Value:
. = ALIGN(sbss_align); \
.sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \
*(.sbss) \
*(.scommon) \
}

Definition at line 526 of file vmlinux.lds.h.

#define SCHED_TEXT
Value:
VMLINUX_SYMBOL(__sched_text_start) = .; \
*(.sched.text) \
VMLINUX_SYMBOL(__sched_text_end) = .;

Definition at line 409 of file vmlinux.lds.h.

#define SECURITY_INIT
Value:
.security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__security_initcall_start) = .; \
*(.security_initcall.init) \
VMLINUX_SYMBOL(__security_initcall_end) = .; \
}

Definition at line 384 of file vmlinux.lds.h.

#define SECURITY_INITCALL
Value:
VMLINUX_SYMBOL(__security_initcall_start) = .; \
*(.security_initcall.init) \
VMLINUX_SYMBOL(__security_initcall_end) = .;

Definition at line 652 of file vmlinux.lds.h.

#define STABS_DEBUG
Value:
.stab 0 : { *(.stab) } \
.stabstr 0 : { *(.stabstr) } \
.stab.excl 0 : { *(.stab.excl) } \
.stab.exclstr 0 : { *(.stab.exclstr) } \
.stab.index 0 : { *(.stab.index) } \
.stab.indexstr 0 : { *(.stab.indexstr) } \
.comment 0 : { *(.comment) }

Definition at line 582 of file vmlinux.lds.h.

#define STRUCT_ALIGN ( )    . = ALIGN(STRUCT_ALIGNMENT)

Definition at line 71 of file vmlinux.lds.h.

#define STRUCT_ALIGNMENT   32

Definition at line 70 of file vmlinux.lds.h.

#define TEXT_TEXT
Value:
*(.text.hot) \
*(.text) \
*(.ref.text) \
DEV_KEEP(init.text) \
DEV_KEEP(exit.text) \
CPU_KEEP(init.text) \
CPU_KEEP(exit.text) \
MEM_KEEP(init.text) \
MEM_KEEP(exit.text) \
*(.text.unlikely)

Definition at line 393 of file vmlinux.lds.h.

#define TRACE_PRINTKS ( )

Definition at line 140 of file vmlinux.lds.h.

#define TRACE_SYSCALLS ( )

Definition at line 149 of file vmlinux.lds.h.

#define TRACEDATA

Definition at line 612 of file vmlinux.lds.h.

#define VMLINUX_SYMBOL (   sym)    sym

Definition at line 56 of file vmlinux.lds.h.