Skip to content

Commit

Permalink
Add missing init section definitions
Browse files Browse the repository at this point in the history
When adding __devinitconst etc. the __initconst variant
were missed.
Add this one and proper definitions for .head.text for use
in .S files.
The naming .head.text is preferred over .text.head as the
latter will conflict for a function named head when introducing
-ffunctions-sections.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Sam Ravnborg committed Feb 19, 2008
1 parent b1d2675 commit 37c514e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@
*(.kprobes.text) \
VMLINUX_SYMBOL(__kprobes_text_end) = .;

/* Section used for early init (in .S files) */
#define HEAD_TEXT *(.head.text)

/* init and exit section handling */
#define INIT_DATA \
*(.init.data) \
Expand Down
2 changes: 2 additions & 0 deletions include/linux/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
discard it in modules) */
#define __init __section(.init.text) __cold
#define __initdata __section(.init.data)
#define __initconst __section(.init.rodata)
#define __exitdata __section(.exit.data)
#define __exit_call __used __section(.exitcall.exit)

Expand Down Expand Up @@ -106,6 +107,7 @@
#define __memexitconst __section(.memexit.rodata)

/* For assembly routines */
#define __HEAD .section ".head.text","ax"
#define __INIT .section ".init.text","ax"
#define __FINIT .previous

Expand Down

0 comments on commit 37c514e

Please sign in to comment.