Skip to content

Commit 7923f90

Browse files
committed
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>
1 parent b9d9732 commit 7923f90

3 files changed

Lines changed: 11 additions & 16 deletions

File tree

‎include/asm-generic/vmlinux.lds.h‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* {
1313
* . = START;
1414
* __init_begin = .;
15-
* HEAD_SECTION
15+
* HEAD_TEXT_SECTION
1616
* INIT_TEXT_SECTION(PAGE_SIZE)
1717
* INIT_DATA_SECTION(...)
1818
* PERCPU(PAGE_SIZE)
@@ -38,7 +38,7 @@
3838
* /DISCARD/ : {
3939
* EXIT_TEXT
4040
* EXIT_DATA
41-
* *(.exitcall.exit)
41+
* EXIT_CALL
4242
* }
4343
* STABS_DEBUG
4444
* DWARF_DEBUG
@@ -52,7 +52,6 @@
5252
* Examples are: [__initramfs_start, __initramfs_end] for initramfs and
5353
* [__nosave_begin, __nosave_end] for the nosave data
5454
*/
55-
#include <linux/section-names.h>
5655

5756
#ifndef LOAD_OFFSET
5857
#define LOAD_OFFSET 0
@@ -414,9 +413,9 @@
414413
#endif
415414

416415
/* Section used for early init (in .S files) */
417-
#define HEAD_TEXT *(HEAD_TEXT_SECTION)
416+
#define HEAD_TEXT *(.head.text)
418417

419-
#define HEAD_SECTION \
418+
#define HEAD_TEXT_SECTION \
420419
.head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { \
421420
HEAD_TEXT \
422421
}
@@ -473,6 +472,9 @@
473472
CPU_DISCARD(exit.text) \
474473
MEM_DISCARD(exit.text)
475474

475+
#define EXIT_CALL \
476+
*(.exitcall.exit)
477+
476478
/*
477479
* bss (Block Started by Symbol) - uninitialized data
478480
* zeroed during startup
@@ -692,7 +694,7 @@
692694
* NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which
693695
* matches the requirment of PAGE_ALIGNED_DATA.
694696
*
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 */
696698
#define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \
697699
. = ALIGN(PAGE_SIZE); \
698700
.data : AT(ADDR(.data) - LOAD_OFFSET) { \
@@ -726,4 +728,5 @@
726728
#define BSS_SECTION(sbss_align, bss_align) \
727729
SBSS \
728730
BSS(bss_align) \
729-
. = ALIGN(4); \
731+
. = ALIGN(4);
732+

‎include/linux/init.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#define _LINUX_INIT_H
33

44
#include <linux/compiler.h>
5-
#include <linux/section-names.h>
6-
#include <linux/stringify.h>
75

86
/* These macros are used to mark some functions or
97
* initialized data (doesn't apply to uninitialized data)
@@ -101,7 +99,7 @@
10199
#define __memexitconst __section(.memexit.rodata)
102100

103101
/* For assembly routines */
104-
#define __HEAD .section __stringify(HEAD_TEXT_SECTION),"ax"
102+
#define __HEAD .section ".head.text","ax"
105103
#define __INIT .section ".init.text","ax"
106104
#define __FINIT .previous
107105

‎include/linux/section-names.h‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)