Re: [PATCH 2/7] x86: Add an option to compile with -ffunction-sections -fdata-sections

Rusty Russell
2009-02-04T08:38:55Z

On Saturday 06 December 2008 10:33:55 Jeff Arnold wrote:
> From: Waseem Daher <wdaher@mit.edu>
>
> This patch makes it possible to link and boot an x86 kernel with
> -ffunction-sections and -fdata-sections enabled.

Nice:
text data bss dec hex filename
3575210 361820 319488 4256518 40f306 vmlinux-with-sections
3579626 364892 323584 4268102 412046 vmlinux-no-sections

> +config FUNCTION_DATA_SECTIONS
> + bool "Compile with -ffunction-sections -fdata-sections"
> + depends on !FTRACE
> + help
> + If you say Y here the compiler will give each function
> + and data structure its own ELF section.

You need to make this depend on X86, otherwise allmodconfig will turn it on
and break other archs.

What's the conflict with FTRACE?

Thanks,
Rusty.