diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-08 11:48:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-08 11:48:51 -0400 |
commit | dba58e39ced7af63f2748d12bbb2b4ac83c72391 (patch) | |
tree | ee15a5e7667b51d0d0f7e8cb39064652f7c84c28 /include/asm-generic/vmlinux.lds.h | |
parent | 9de36825b321fe9fe9cf73260554251af579f4ca (diff) | |
parent | 78ff7fae04554b49d29226ed12536268c2500d1f (diff) |
Merge branches 'tracing/doc', 'tracing/ftrace', 'tracing/printk' and 'tracing/textedit' into tracing/core
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 55 |
1 files changed, 51 insertions, 4 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 48ade3168b13..89997dfdf3d0 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -448,12 +448,59 @@ | |||
448 | *(.initcall7.init) \ | 448 | *(.initcall7.init) \ |
449 | *(.initcall7s.init) | 449 | *(.initcall7s.init) |
450 | 450 | ||
451 | /** | ||
452 | * PERCPU_VADDR - define output section for percpu area | ||
453 | * @vaddr: explicit base address (optional) | ||
454 | * @phdr: destination PHDR (optional) | ||
455 | * | ||
456 | * Macro which expands to output section for percpu area. If @vaddr | ||
457 | * is not blank, it specifies explicit base address and all percpu | ||
458 | * symbols will be offset from the given address. If blank, @vaddr | ||
459 | * always equals @laddr + LOAD_OFFSET. | ||
460 | * | ||
461 | * @phdr defines the output PHDR to use if not blank. Be warned that | ||
462 | * output PHDR is sticky. If @phdr is specified, the next output | ||
463 | * section in the linker script will go there too. @phdr should have | ||
464 | * a leading colon. | ||
465 | * | ||
466 | * Note that this macros defines __per_cpu_load as an absolute symbol. | ||
467 | * If there is no need to put the percpu section at a predetermined | ||
468 | * address, use PERCPU(). | ||
469 | */ | ||
470 | #define PERCPU_VADDR(vaddr, phdr) \ | ||
471 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ | ||
472 | .data.percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ | ||
473 | - LOAD_OFFSET) { \ | ||
474 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | ||
475 | *(.data.percpu.first) \ | ||
476 | *(.data.percpu.page_aligned) \ | ||
477 | *(.data.percpu) \ | ||
478 | *(.data.percpu.shared_aligned) \ | ||
479 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ | ||
480 | } phdr \ | ||
481 | . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data.percpu); | ||
482 | |||
483 | /** | ||
484 | * PERCPU - define output section for percpu area, simple version | ||
485 | * @align: required alignment | ||
486 | * | ||
487 | * Align to @align and outputs output section for percpu area. This | ||
488 | * macro doesn't maniuplate @vaddr or @phdr and __per_cpu_load and | ||
489 | * __per_cpu_start will be identical. | ||
490 | * | ||
491 | * This macro is equivalent to ALIGN(align); PERCPU_VADDR( , ) except | ||
492 | * that __per_cpu_load is defined as a relative symbol against | ||
493 | * .data.percpu which is required for relocatable x86_32 | ||
494 | * configuration. | ||
495 | */ | ||
451 | #define PERCPU(align) \ | 496 | #define PERCPU(align) \ |
452 | . = ALIGN(align); \ | 497 | . = ALIGN(align); \ |
453 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | 498 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \ |
454 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \ | 499 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ |
500 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | ||
501 | *(.data.percpu.first) \ | ||
455 | *(.data.percpu.page_aligned) \ | 502 | *(.data.percpu.page_aligned) \ |
456 | *(.data.percpu) \ | 503 | *(.data.percpu) \ |
457 | *(.data.percpu.shared_aligned) \ | 504 | *(.data.percpu.shared_aligned) \ |
458 | } \ | 505 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ |
459 | VMLINUX_SYMBOL(__per_cpu_end) = .; | 506 | } |