kernel_optimize_test/arch/x86/kernel/acpi
Eric Dumazet 4c4915627f x86: make arch/x86/kernel/acpi/wakeup_32.S use a separate
While examining vmlinux namelist on i386 (nm -v vmlinux) I noticed :

c01021d0 t es7000_rename_gsi
c010221a T es7000_start_cpu
<Big Hole>
c0103000 T thread_saved_pc

and

c0113218 T acpi_restore_state_mem
c0113219 T acpi_save_state_mem
<Big Hole>
c0114000 t wakeup_code

This is because arch/x86/kernel/acpi/wakeup_32.S forces a .text alignment
of 4096 bytes. (I have no idea if it is really needed, since
arch/x86/kernel/acpi/wakeup_64.S uses a 16 bytes alignment *only*)

So arch/x86/kernel/built-in.o also has this alignment

arch/x86/kernel/built-in.o:     file format elf32-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00018c94  00000000  00000000  00001000  2**12
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE

But as arch/x86/kernel/acpi/wakeup_32.o is not the first object linked
into arch/x86/kernel/built-in.o, linker had to build several holes to meet
alignement requirements, because of .o nestings in the kbuild process.

This can be solved by using a special section, .text.page_aligned, so that
no holes are needed.

# size vmlinux.before vmlinux.after
   text    data     bss     dec     hex filename
4619942  422838  458752 5501532  53f25c vmlinux.before
4610534  422838  458752 5492124  53cd9c vmlinux.after

This saves 9408 bytes

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:32:50 +01:00
..
boot.c x86: add hpet sanity checks 2007-11-17 16:27:01 +01:00
cstate.c x86: convert cpuinfo_x86 array to a per_cpu array 2007-10-19 20:35:04 +02:00
Makefile x86: Unify arch/x86/kernel/acpi Makefiles 2007-10-23 22:37:23 +02:00
processor.c ACPI: Enable MSR (FixedHW) support for T-States 2007-11-16 21:46:25 -05:00
sleep_32.c x86: remove last users of FASTCALL 2008-01-30 13:31:16 +01:00
sleep_64.c x86_64: remove acpi_pci_link_exit() 2007-11-16 21:18:09 -05:00
wakeup_32.S x86: make arch/x86/kernel/acpi/wakeup_32.S use a separate 2008-01-30 13:32:50 +01:00
wakeup_64.S x86: rename the struct pt_regs members for 32/64-bit consistency 2008-01-30 13:30:56 +01:00