forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
b9d97328e2
commit
7923f90fff
|
@ -12,7 +12,7 @@
|
||||||
* {
|
* {
|
||||||
* . = START;
|
* . = START;
|
||||||
* __init_begin = .;
|
* __init_begin = .;
|
||||||
* HEAD_SECTION
|
* HEAD_TEXT_SECTION
|
||||||
* INIT_TEXT_SECTION(PAGE_SIZE)
|
* INIT_TEXT_SECTION(PAGE_SIZE)
|
||||||
* INIT_DATA_SECTION(...)
|
* INIT_DATA_SECTION(...)
|
||||||
* PERCPU(PAGE_SIZE)
|
* PERCPU(PAGE_SIZE)
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
* /DISCARD/ : {
|
* /DISCARD/ : {
|
||||||
* EXIT_TEXT
|
* EXIT_TEXT
|
||||||
* EXIT_DATA
|
* EXIT_DATA
|
||||||
* *(.exitcall.exit)
|
* EXIT_CALL
|
||||||
* }
|
* }
|
||||||
* STABS_DEBUG
|
* STABS_DEBUG
|
||||||
* DWARF_DEBUG
|
* DWARF_DEBUG
|
||||||
|
@ -52,7 +52,6 @@
|
||||||
* Examples are: [__initramfs_start, __initramfs_end] for initramfs and
|
* Examples are: [__initramfs_start, __initramfs_end] for initramfs and
|
||||||
* [__nosave_begin, __nosave_end] for the nosave data
|
* [__nosave_begin, __nosave_end] for the nosave data
|
||||||
*/
|
*/
|
||||||
#include <linux/section-names.h>
|
|
||||||
|
|
||||||
#ifndef LOAD_OFFSET
|
#ifndef LOAD_OFFSET
|
||||||
#define LOAD_OFFSET 0
|
#define LOAD_OFFSET 0
|
||||||
|
@ -414,9 +413,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Section used for early init (in .S files) */
|
/* Section used for early init (in .S files) */
|
||||||
#define HEAD_TEXT *(HEAD_TEXT_SECTION)
|
#define HEAD_TEXT *(.head.text)
|
||||||
|
|
||||||
#define HEAD_SECTION \
|
#define HEAD_TEXT_SECTION \
|
||||||
.head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { \
|
.head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { \
|
||||||
HEAD_TEXT \
|
HEAD_TEXT \
|
||||||
}
|
}
|
||||||
|
@ -473,6 +472,9 @@
|
||||||
CPU_DISCARD(exit.text) \
|
CPU_DISCARD(exit.text) \
|
||||||
MEM_DISCARD(exit.text)
|
MEM_DISCARD(exit.text)
|
||||||
|
|
||||||
|
#define EXIT_CALL \
|
||||||
|
*(.exitcall.exit)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bss (Block Started by Symbol) - uninitialized data
|
* bss (Block Started by Symbol) - uninitialized data
|
||||||
* zeroed during startup
|
* zeroed during startup
|
||||||
|
@ -692,7 +694,7 @@
|
||||||
* NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which
|
* NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which
|
||||||
* matches the requirment of PAGE_ALIGNED_DATA.
|
* matches the requirment of PAGE_ALIGNED_DATA.
|
||||||
*
|
*
|
||||||
/* use 0 as page_align if page_aligned data is not used */
|
* use 0 as page_align if page_aligned data is not used */
|
||||||
#define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \
|
#define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \
|
||||||
. = ALIGN(PAGE_SIZE); \
|
. = ALIGN(PAGE_SIZE); \
|
||||||
.data : AT(ADDR(.data) - LOAD_OFFSET) { \
|
.data : AT(ADDR(.data) - LOAD_OFFSET) { \
|
||||||
|
@ -726,4 +728,5 @@
|
||||||
#define BSS_SECTION(sbss_align, bss_align) \
|
#define BSS_SECTION(sbss_align, bss_align) \
|
||||||
SBSS \
|
SBSS \
|
||||||
BSS(bss_align) \
|
BSS(bss_align) \
|
||||||
. = ALIGN(4); \
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
#define _LINUX_INIT_H
|
#define _LINUX_INIT_H
|
||||||
|
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
#include <linux/section-names.h>
|
|
||||||
#include <linux/stringify.h>
|
|
||||||
|
|
||||||
/* These macros are used to mark some functions or
|
/* These macros are used to mark some functions or
|
||||||
* initialized data (doesn't apply to uninitialized data)
|
* initialized data (doesn't apply to uninitialized data)
|
||||||
|
@ -101,7 +99,7 @@
|
||||||
#define __memexitconst __section(.memexit.rodata)
|
#define __memexitconst __section(.memexit.rodata)
|
||||||
|
|
||||||
/* For assembly routines */
|
/* For assembly routines */
|
||||||
#define __HEAD .section __stringify(HEAD_TEXT_SECTION),"ax"
|
#define __HEAD .section ".head.text","ax"
|
||||||
#define __INIT .section ".init.text","ax"
|
#define __INIT .section ".init.text","ax"
|
||||||
#define __FINIT .previous
|
#define __FINIT .previous
|
||||||
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
#ifndef __LINUX_SECTION_NAMES_H
|
|
||||||
#define __LINUX_SECTION_NAMES_H
|
|
||||||
|
|
||||||
#define HEAD_TEXT_SECTION .head.text
|
|
||||||
|
|
||||||
#endif /* !__LINUX_SECTION_NAMES_H */
|
|
Loading…
Reference in New Issue
Block a user