Move definition of .text section to asm-generic. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
@@ -15,7 +15,7 @@ SECTIONS
_text = .; /* Text and read-only data */
.text : {
- *(.text)
+ TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
@@ -90,7 +90,7 @@ SECTIONS
__exception_text_start = .;
*(.exception.text)
__exception_text_end = .;
#ifdef CONFIG_MMU
@@ -64,7 +64,7 @@ SECTIONS
.text : { /* Real text segment */
LOCK_TEXT /* FIXME - borrowed from arm32 - check*/
@@ -65,7 +65,7 @@ SECTIONS
@@ -76,7 +76,7 @@ SECTIONS
. = 0x100;
*(.scall.text)
*(.irq.text)
KPROBES_TEXT
@@ -54,7 +54,7 @@ SECTIONS
{
_text = .;
__stext = .;
*(.text.lock)
. = ALIGN(16);
@@ -101,13 +101,14 @@ SECTIONS
_stext = .;
*(
- .text.start .text .text.*
+ .text.start .text.*
#ifdef CONFIG_DEBUG_INFO
.init.text
.exit.text
.exitcall.exit
#endif
)
@@ -75,7 +75,7 @@ SECTIONS
*(.int_redirect)
__stext = . ;
__etext = . ;
@@ -44,7 +44,7 @@ SECTIONS
/* read-only */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
.text : AT(ADDR(.text) - LOAD_OFFSET)
IVT_TEXT
@@ -27,7 +27,7 @@ SECTIONS
.boot : { *(.boot) } = 0
@@ -11,7 +11,7 @@ SECTIONS
. = 0x1000;
@@ -12,7 +12,7 @@ SECTIONS
*(.head)
@@ -62,7 +62,7 @@ SECTIONS {
_stext = . ;
@@ -51,7 +51,7 @@ SECTIONS
.text ALIGN(16) : {
*(.text.do_softirq)
@@ -34,7 +34,8 @@ SECTIONS
/* Text and gots */
- *(.text .text.*)
+ *(.text.*)
@@ -32,7 +32,7 @@ SECTIONS
.text :
@@ -21,7 +21,7 @@ SECTIONS
. = 0x00000000;
@@ -22,7 +22,7 @@ SECTIONS
*(.empty_zero_page)
} = 0
.text : C_PHYS(.text) {
*(.text64)
*(.text..SHmedia32)
.text 0xf0004000 :
*(.gnu.warning)
@@ -14,7 +14,7 @@ SECTIONS
.text 0x0000000000404000 :
@@ -62,7 +62,7 @@ SECTIONS
} =0x90909090
.plt : { *(.plt) }
@@ -37,7 +37,7 @@ SECTIONS
@@ -92,7 +92,7 @@
#define TEXT_CONTENTS \
_text = .; \
__stext = . ; \
- *(.text) \
+ TEXT_TEXT \
SCHED_TEXT \
*(.exit.text) /* 2.5 convention */ \
*(.text.exit) /* 2.4 convention */ \
@@ -31,7 +31,7 @@ SECTIONS
*(.bootstrap.text)
/* Then the rest */
@@ -84,7 +84,8 @@ SECTIONS
/* The .head.text section must be the first section! */
*(.head.text)
- *(.literal .text)
+ *(.literal)
*(.srom.text)
VMLINUX_SYMBOL(__sched_text_start) = .;
*(.sched.literal .sched.text)
@@ -139,6 +139,12 @@
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
* address even at second ld pass when generating System.map */
#define SCHED_TEXT \