Commit 7664709b authored by Sam Ravnborg's avatar Sam Ravnborg

all-archs: consolidate .text section definition in asm-generic

Move definition of .text section to asm-generic.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent cd547791
...@@ -15,7 +15,7 @@ SECTIONS ...@@ -15,7 +15,7 @@ SECTIONS
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.text : { .text : {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -90,7 +90,7 @@ SECTIONS ...@@ -90,7 +90,7 @@ SECTIONS
__exception_text_start = .; __exception_text_start = .;
*(.exception.text) *(.exception.text)
__exception_text_end = .; __exception_text_end = .;
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
......
...@@ -64,7 +64,7 @@ SECTIONS ...@@ -64,7 +64,7 @@ SECTIONS
.text : { /* Real text segment */ .text : { /* Real text segment */
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT /* FIXME - borrowed from arm32 - check*/ LOCK_TEXT /* FIXME - borrowed from arm32 - check*/
*(.fixup) *(.fixup)
......
...@@ -65,7 +65,7 @@ SECTIONS ...@@ -65,7 +65,7 @@ SECTIONS
.text : { /* Real text segment */ .text : { /* Real text segment */
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -76,7 +76,7 @@ SECTIONS ...@@ -76,7 +76,7 @@ SECTIONS
. = 0x100; . = 0x100;
*(.scall.text) *(.scall.text)
*(.irq.text) *(.irq.text)
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
KPROBES_TEXT KPROBES_TEXT
......
...@@ -54,7 +54,7 @@ SECTIONS ...@@ -54,7 +54,7 @@ SECTIONS
{ {
_text = .; _text = .;
__stext = .; __stext = .;
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
*(.text.lock) *(.text.lock)
. = ALIGN(16); . = ALIGN(16);
......
...@@ -101,13 +101,14 @@ SECTIONS ...@@ -101,13 +101,14 @@ SECTIONS
_stext = .; _stext = .;
.text : { .text : {
*( *(
.text.start .text .text.* .text.start .text.*
#ifdef CONFIG_DEBUG_INFO #ifdef CONFIG_DEBUG_INFO
.init.text .init.text
.exit.text .exit.text
.exitcall.exit .exitcall.exit
#endif #endif
) )
TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -75,7 +75,7 @@ SECTIONS ...@@ -75,7 +75,7 @@ SECTIONS
*(.int_redirect) *(.int_redirect)
#endif #endif
__stext = . ; __stext = . ;
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
__etext = . ; __etext = . ;
......
...@@ -44,7 +44,7 @@ SECTIONS ...@@ -44,7 +44,7 @@ SECTIONS
/* read-only */ /* read-only */
.text : AT(ADDR(.text) - LOAD_OFFSET) { .text : AT(ADDR(.text) - LOAD_OFFSET) {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
KPROBES_TEXT KPROBES_TEXT
......
...@@ -44,7 +44,7 @@ SECTIONS ...@@ -44,7 +44,7 @@ SECTIONS
.text : AT(ADDR(.text) - LOAD_OFFSET) .text : AT(ADDR(.text) - LOAD_OFFSET)
{ {
IVT_TEXT IVT_TEXT
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
KPROBES_TEXT KPROBES_TEXT
......
...@@ -27,7 +27,7 @@ SECTIONS ...@@ -27,7 +27,7 @@ SECTIONS
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.boot : { *(.boot) } = 0 .boot : { *(.boot) } = 0
.text : { .text : {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -11,7 +11,7 @@ SECTIONS ...@@ -11,7 +11,7 @@ SECTIONS
. = 0x1000; . = 0x1000;
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.text : { .text : {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -12,7 +12,7 @@ SECTIONS ...@@ -12,7 +12,7 @@ SECTIONS
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.text : { .text : {
*(.head) *(.head)
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -62,7 +62,7 @@ SECTIONS { ...@@ -62,7 +62,7 @@ SECTIONS {
.text : { .text : {
_text = .; _text = .;
_stext = . ; _stext = . ;
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
*(.text.lock) *(.text.lock)
......
...@@ -27,7 +27,7 @@ SECTIONS ...@@ -27,7 +27,7 @@ SECTIONS
/* read-only */ /* read-only */
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.text : { .text : {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -51,7 +51,7 @@ SECTIONS ...@@ -51,7 +51,7 @@ SECTIONS
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.text ALIGN(16) : { .text ALIGN(16) : {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.text.do_softirq) *(.text.do_softirq)
......
...@@ -34,7 +34,8 @@ SECTIONS ...@@ -34,7 +34,8 @@ SECTIONS
/* Text and gots */ /* Text and gots */
.text : { .text : {
_text = .; _text = .;
*(.text .text.*) *(.text.*)
TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
KPROBES_TEXT KPROBES_TEXT
......
...@@ -32,7 +32,7 @@ SECTIONS ...@@ -32,7 +32,7 @@ SECTIONS
.text : .text :
{ {
_text = .; _text = .;
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -21,7 +21,7 @@ SECTIONS ...@@ -21,7 +21,7 @@ SECTIONS
. = 0x00000000; . = 0x00000000;
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.text : { .text : {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
KPROBES_TEXT KPROBES_TEXT
......
...@@ -22,7 +22,7 @@ SECTIONS ...@@ -22,7 +22,7 @@ SECTIONS
*(.empty_zero_page) *(.empty_zero_page)
} = 0 } = 0
.text : { .text : {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -54,7 +54,7 @@ SECTIONS ...@@ -54,7 +54,7 @@ SECTIONS
} = 0 } = 0
.text : C_PHYS(.text) { .text : C_PHYS(.text) {
*(.text) TEXT_TEXT
*(.text64) *(.text64)
*(.text..SHmedia32) *(.text..SHmedia32)
SCHED_TEXT SCHED_TEXT
......
...@@ -12,7 +12,7 @@ SECTIONS ...@@ -12,7 +12,7 @@ SECTIONS
.text 0xf0004000 : .text 0xf0004000 :
{ {
_text = .; _text = .;
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.gnu.warning) *(.gnu.warning)
......
...@@ -14,7 +14,7 @@ SECTIONS ...@@ -14,7 +14,7 @@ SECTIONS
.text 0x0000000000404000 : .text 0x0000000000404000 :
{ {
_text = .; _text = .;
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
KPROBES_TEXT KPROBES_TEXT
......
...@@ -62,7 +62,7 @@ SECTIONS ...@@ -62,7 +62,7 @@ SECTIONS
} =0x90909090 } =0x90909090
.plt : { *(.plt) } .plt : { *(.plt) }
.text : { .text : {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -37,7 +37,7 @@ SECTIONS ...@@ -37,7 +37,7 @@ SECTIONS
.text : .text :
{ {
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
#define TEXT_CONTENTS \ #define TEXT_CONTENTS \
_text = .; \ _text = .; \
__stext = . ; \ __stext = . ; \
*(.text) \ TEXT_TEXT \
SCHED_TEXT \ SCHED_TEXT \
*(.exit.text) /* 2.5 convention */ \ *(.exit.text) /* 2.5 convention */ \
*(.text.exit) /* 2.4 convention */ \ *(.text.exit) /* 2.4 convention */ \
......
...@@ -31,7 +31,7 @@ SECTIONS ...@@ -31,7 +31,7 @@ SECTIONS
*(.bootstrap.text) *(.bootstrap.text)
_stext = .; _stext = .;
/* Then the rest */ /* Then the rest */
*(.text) TEXT_TEXT
SCHED_TEXT SCHED_TEXT
LOCK_TEXT LOCK_TEXT
KPROBES_TEXT KPROBES_TEXT
......
...@@ -84,7 +84,8 @@ SECTIONS ...@@ -84,7 +84,8 @@ SECTIONS
{ {
/* The .head.text section must be the first section! */ /* The .head.text section must be the first section! */
*(.head.text) *(.head.text)
*(.literal .text) *(.literal)
TEXT_TEXT
*(.srom.text) *(.srom.text)
VMLINUX_SYMBOL(__sched_text_start) = .; VMLINUX_SYMBOL(__sched_text_start) = .;
*(.sched.literal .sched.text) *(.sched.literal .sched.text)
......
...@@ -139,6 +139,12 @@ ...@@ -139,6 +139,12 @@
VMLINUX_SYMBOL(__security_initcall_end) = .; \ VMLINUX_SYMBOL(__security_initcall_end) = .; \
} }
/* .text section. Map to function alignment to avoid address changes
* during second ld run in second ld pass when generating System.map */
#define TEXT_TEXT \
ALIGN_FUNCTION(); \
*(.text)
/* sched.text is aling to function alignment to secure we have same /* sched.text is aling to function alignment to secure we have same
* address even at second ld pass when generating System.map */ * address even at second ld pass when generating System.map */
#define SCHED_TEXT \ #define SCHED_TEXT \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment