Skip to content

Commit

Permalink
all-archs: consolidate .text section definition in asm-generic
Browse files Browse the repository at this point in the history
Move definition of .text section to asm-generic.

Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
sravnborg committed May 19, 2007
1 parent cd54779 commit 7664709
Show file tree
Hide file tree
Showing 29 changed files with 37 additions and 28 deletions.
2 changes: 1 addition & 1 deletion arch/alpha/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SECTIONS

_text = .; /* Text and read-only data */
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ SECTIONS
__exception_text_start = .;
*(.exception.text)
__exception_text_end = .;
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
#ifdef CONFIG_MMU
Expand Down
2 changes: 1 addition & 1 deletion arch/arm26/kernel/vmlinux-arm26-xip.lds.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ SECTIONS

.text : { /* Real text segment */
_text = .; /* Text and read-only data */
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT /* FIXME - borrowed from arm32 - check*/
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm26/kernel/vmlinux-arm26.lds.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ SECTIONS

.text : { /* Real text segment */
_text = .; /* Text and read-only data */
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/kernel/vmlinux.lds.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ SECTIONS
. = 0x100;
*(.scall.text)
*(.irq.text)
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ SECTIONS
{
_text = .;
__stext = .;
*(.text)
TEXT_TEXT
SCHED_TEXT
*(.text.lock)
. = ALIGN(16);
Expand Down
3 changes: 2 additions & 1 deletion arch/frv/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,14 @@ SECTIONS
_stext = .;
.text : {
*(
.text.start .text .text.*
.text.start .text.*
#ifdef CONFIG_DEBUG_INFO
.init.text
.exit.text
.exitcall.exit
#endif
)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/h8300/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ SECTIONS
*(.int_redirect)
#endif
__stext = . ;
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
__etext = . ;
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SECTIONS

/* read-only */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SECTIONS
.text : AT(ADDR(.text) - LOAD_OFFSET)
{
IVT_TEXT
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
Expand Down
2 changes: 1 addition & 1 deletion arch/m32r/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SECTIONS
_text = .; /* Text and read-only data */
.boot : { *(.boot) } = 0
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/kernel/vmlinux-std.lds
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SECTIONS
. = 0x1000;
_text = .; /* Text and read-only data */
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/kernel/vmlinux-sun3.lds
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SECTIONS
_text = .; /* Text and read-only data */
.text : {
*(.head)
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/m68knommu/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SECTIONS {
.text : {
_text = .;
_stext = . ;
*(.text)
TEXT_TEXT
SCHED_TEXT
*(.text.lock)

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SECTIONS
/* read-only */
_text = .; /* Text and read-only data */
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SECTIONS

_text = .; /* Text and read-only data */
.text ALIGN(16) : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.text.do_softirq)
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ SECTIONS
/* Text and gots */
.text : {
_text = .;
*(.text .text.*)
*(.text.*)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
Expand Down
2 changes: 1 addition & 1 deletion arch/ppc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SECTIONS
.text :
{
_text = .;
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SECTIONS
. = 0x00000000;
_text = .; /* Text and read-only data */
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SECTIONS
*(.empty_zero_page)
} = 0
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/sh64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ SECTIONS
} = 0

.text : C_PHYS(.text) {
*(.text)
TEXT_TEXT
*(.text64)
*(.text..SHmedia32)
SCHED_TEXT
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SECTIONS
.text 0xf0004000 :
{
_text = .;
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.gnu.warning)
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SECTIONS
.text 0x0000000000404000 :
{
_text = .;
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
Expand Down
2 changes: 1 addition & 1 deletion arch/um/kernel/dyn.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SECTIONS
} =0x90909090
.plt : { *(.plt) }
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/um/kernel/uml.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SECTIONS

.text :
{
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand Down
2 changes: 1 addition & 1 deletion arch/v850/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
#define TEXT_CONTENTS \
_text = .; \
__stext = . ; \
*(.text) \
TEXT_TEXT \
SCHED_TEXT \
*(.exit.text) /* 2.5 convention */ \
*(.text.exit) /* 2.4 convention */ \
Expand Down
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SECTIONS
*(.bootstrap.text)
_stext = .;
/* Then the rest */
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
Expand Down
3 changes: 2 additions & 1 deletion arch/xtensa/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ SECTIONS
{
/* The .head.text section must be the first section! */
*(.head.text)
*(.literal .text)
*(.literal)
TEXT_TEXT
*(.srom.text)
VMLINUX_SYMBOL(__sched_text_start) = .;
*(.sched.literal .sched.text)
Expand Down
6 changes: 6 additions & 0 deletions include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 7664709

Please sign in to comment.