diff options
| author | Matthew Wilcox <willy@debian.org> | 2002-10-15 18:46:37 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-15 18:46:37 -0700 |
| commit | 9beb225e0f1616a6cea6b0086a9ff94a09965c6c (patch) | |
| tree | 9e11d337fb1bfc34d25c38f44491c365e2c56bbe /include/linux | |
| parent | 4c41a1ceae53530791bc18664b064a1e90c3fc84 (diff) | |
[PATCH] Allow compilation with -ffunction-sections
If you compile the kernel with -ffunction-sections, each function gets
put in a section .text.function_name. This collides with our current use
of .text.init. So here's a patch which converts x86 to use .init.text
instead.
I've tested it on x86 and it still frees 120k of ram, so it seems to work.
Other architectures will need to change their vmlinux.lds appropriately,
and may need other changes (arm, m68k seem to use .text.init verbatim).
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/init.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/init.h b/include/linux/init.h index 42300a7371af..d9b7f490e66d 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -93,18 +93,18 @@ extern struct kernel_param __setup_start, __setup_end; * Mark functions and data as being only used at initialization * or exit time. */ -#define __init __attribute__ ((__section__ (".text.init"))) -#define __exit __attribute__ ((unused, __section__(".text.exit"))) -#define __initdata __attribute__ ((__section__ (".data.init"))) -#define __exitdata __attribute__ ((unused, __section__ (".data.exit"))) -#define __initsetup __attribute__ ((unused,__section__ (".setup.init"))) +#define __init __attribute__ ((__section__ (".init.text"))) +#define __exit __attribute__ ((unused, __section__(".exit.text"))) +#define __initdata __attribute__ ((__section__ (".init.data"))) +#define __exitdata __attribute__ ((unused, __section__ (".exit.data"))) +#define __initsetup __attribute__ ((unused,__section__ (".init.setup"))) #define __init_call(level) __attribute__ ((unused,__section__ (".initcall" level ".init"))) #define __exit_call __attribute__ ((unused,__section__ (".exitcall.exit"))) /* For assembly routines */ -#define __INIT .section ".text.init","ax" +#define __INIT .section ".init.text","ax" #define __FINIT .previous -#define __INITDATA .section ".data.init","aw" +#define __INITDATA .section ".init.data","aw" /** * module_init() - driver initialization entry point |
