diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-06-14 16:10:41 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-06-14 16:10:41 -0400 |
commit | 7923f90fffa8746f6457d4eea2109fd3d6414189 (patch) | |
tree | cd262beed7fd28a20f708fdb7889d6c5d55f39d5 /include | |
parent | b9d97328e27b9272ed2ff2ad18de61aa1bf12af8 (diff) |
vmlinux.lds.h update
Updated after review by Tim Abbott.
- Use HEAD_TEXT_SECTION
- Drop use of section-names.h and delete file
- Introduce EXIT_CALL
Deleting section-names.h required a few simple
updates of init.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@ksplice.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 17 | ||||
-rw-r--r-- | include/linux/init.h | 4 | ||||
-rw-r--r-- | include/linux/section-names.h | 6 |
3 files changed, 11 insertions, 16 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index fba42236e942..7381f701f3f3 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -12,7 +12,7 @@ | |||
12 | * { | 12 | * { |
13 | * . = START; | 13 | * . = START; |
14 | * __init_begin = .; | 14 | * __init_begin = .; |
15 | * HEAD_SECTION | 15 | * HEAD_TEXT_SECTION |
16 | * INIT_TEXT_SECTION(PAGE_SIZE) | 16 | * INIT_TEXT_SECTION(PAGE_SIZE) |
17 | * INIT_DATA_SECTION(...) | 17 | * INIT_DATA_SECTION(...) |
18 | * PERCPU(PAGE_SIZE) | 18 | * PERCPU(PAGE_SIZE) |
@@ -38,7 +38,7 @@ | |||
38 | * /DISCARD/ : { | 38 | * /DISCARD/ : { |
39 | * EXIT_TEXT | 39 | * EXIT_TEXT |
40 | * EXIT_DATA | 40 | * EXIT_DATA |
41 | * *(.exitcall.exit) | 41 | * EXIT_CALL |
42 | * } | 42 | * } |
43 | * STABS_DEBUG | 43 | * STABS_DEBUG |
44 | * DWARF_DEBUG | 44 | * DWARF_DEBUG |
@@ -52,7 +52,6 @@ | |||
52 | * Examples are: [__initramfs_start, __initramfs_end] for initramfs and | 52 | * Examples are: [__initramfs_start, __initramfs_end] for initramfs and |
53 | * [__nosave_begin, __nosave_end] for the nosave data | 53 | * [__nosave_begin, __nosave_end] for the nosave data |
54 | */ | 54 | */ |
55 | #include <linux/section-names.h> | ||
56 | 55 | ||
57 | #ifndef LOAD_OFFSET | 56 | #ifndef LOAD_OFFSET |
58 | #define LOAD_OFFSET 0 | 57 | #define LOAD_OFFSET 0 |
@@ -414,9 +413,9 @@ | |||
414 | #endif | 413 | #endif |
415 | 414 | ||
416 | /* Section used for early init (in .S files) */ | 415 | /* Section used for early init (in .S files) */ |
417 | #define HEAD_TEXT *(HEAD_TEXT_SECTION) | 416 | #define HEAD_TEXT *(.head.text) |
418 | 417 | ||
419 | #define HEAD_SECTION \ | 418 | #define HEAD_TEXT_SECTION \ |
420 | .head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { \ | 419 | .head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { \ |
421 | HEAD_TEXT \ | 420 | HEAD_TEXT \ |
422 | } | 421 | } |
@@ -473,6 +472,9 @@ | |||
473 | CPU_DISCARD(exit.text) \ | 472 | CPU_DISCARD(exit.text) \ |
474 | MEM_DISCARD(exit.text) | 473 | MEM_DISCARD(exit.text) |
475 | 474 | ||
475 | #define EXIT_CALL \ | ||
476 | *(.exitcall.exit) | ||
477 | |||
476 | /* | 478 | /* |
477 | * bss (Block Started by Symbol) - uninitialized data | 479 | * bss (Block Started by Symbol) - uninitialized data |
478 | * zeroed during startup | 480 | * zeroed during startup |
@@ -692,7 +694,7 @@ | |||
692 | * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which | 694 | * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which |
693 | * matches the requirment of PAGE_ALIGNED_DATA. | 695 | * matches the requirment of PAGE_ALIGNED_DATA. |
694 | * | 696 | * |
695 | /* use 0 as page_align if page_aligned data is not used */ | 697 | * use 0 as page_align if page_aligned data is not used */ |
696 | #define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \ | 698 | #define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \ |
697 | . = ALIGN(PAGE_SIZE); \ | 699 | . = ALIGN(PAGE_SIZE); \ |
698 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ | 700 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ |
@@ -726,4 +728,5 @@ | |||
726 | #define BSS_SECTION(sbss_align, bss_align) \ | 728 | #define BSS_SECTION(sbss_align, bss_align) \ |
727 | SBSS \ | 729 | SBSS \ |
728 | BSS(bss_align) \ | 730 | BSS(bss_align) \ |
729 | . = ALIGN(4); \ | 731 | . = ALIGN(4); |
732 | |||
diff --git a/include/linux/init.h b/include/linux/init.h index 9f70c9f25d4b..b2189803f19a 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define _LINUX_INIT_H | 2 | #define _LINUX_INIT_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/section-names.h> | ||
6 | #include <linux/stringify.h> | ||
7 | 5 | ||
8 | /* These macros are used to mark some functions or | 6 | /* These macros are used to mark some functions or |
9 | * initialized data (doesn't apply to uninitialized data) | 7 | * initialized data (doesn't apply to uninitialized data) |
@@ -101,7 +99,7 @@ | |||
101 | #define __memexitconst __section(.memexit.rodata) | 99 | #define __memexitconst __section(.memexit.rodata) |
102 | 100 | ||
103 | /* For assembly routines */ | 101 | /* For assembly routines */ |
104 | #define __HEAD .section __stringify(HEAD_TEXT_SECTION),"ax" | 102 | #define __HEAD .section ".head.text","ax" |
105 | #define __INIT .section ".init.text","ax" | 103 | #define __INIT .section ".init.text","ax" |
106 | #define __FINIT .previous | 104 | #define __FINIT .previous |
107 | 105 | ||
diff --git a/include/linux/section-names.h b/include/linux/section-names.h deleted file mode 100644 index c956f4eb2adf..000000000000 --- a/include/linux/section-names.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __LINUX_SECTION_NAMES_H | ||
2 | #define __LINUX_SECTION_NAMES_H | ||
3 | |||
4 | #define HEAD_TEXT_SECTION .head.text | ||
5 | |||
6 | #endif /* !__LINUX_SECTION_NAMES_H */ | ||