kernel_optimize_test/arch/mips/kernel
Ralf Baechle 2efac77e82 [MIPS] Discard .exit.text and .exit.data at runtime.
While the recent cset 86384d5441 did improve
things it didn't resolve all the problems.  So bite the bullet and discard
.exit.text and .exit.data at runtime.  Which of course sucks because it
bloats binaries with code that will never ever be used but it's the only
thing that will work reliable as demonstrated by the function sd_major() in
drivers/scsi/sd.c.

Gcc may compile sd_major() using a jump table which it will put into
.rodata.  If it also inlines sd_major's function body into exit_sd() which
gcc > 3.4.x does.  If CONFIG_BLK_DEV_SD has been set to y we would like ld
to discard exit_sd's code at link time.  However sd_major happens to
contain a switch statement which gcc will compile using a jump table in
.rodata on the architectures I checked.  So, when ld later discards
.exit.text only the jump table in .rodata with its stale references to
the discard .exit.text will be left which any no antique ld will honor
with a link error.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-12-12 01:46:24 +00:00
..
apm.c [MIPS] Don't include obsolete <linux/config.h>. 2006-07-13 21:25:58 +01:00
asm-offsets.c [MIPS] 16K & 64K page size fixes 2006-11-01 17:46:09 +00:00
binfmt_elfn32.c [PATCH] elf: Always define elf_addr_t in linux/elf.h 2006-12-07 08:39:38 -08:00
binfmt_elfo32.c [PATCH] elf: Always define elf_addr_t in linux/elf.h 2006-12-07 08:39:38 -08:00
branch.c [MIPS] Unify mips_fpu_soft_struct and mips_fpu_hard_structs. 2006-06-19 17:39:18 +01:00
cpu-bugs64.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpu-probe.c [MIPS] Don't print presence of WAIT instruction on bootup. 2006-11-30 01:14:44 +00:00
entry.S [MIPS] SMTC: Fix crash if # of TC's > # of VPE's after pt_regs irq cleanup. 2006-11-01 17:46:09 +00:00
gdb-low.S [MIPS] TRACE_IRQFLAGS_SUPPORT support. 2006-07-13 21:26:09 +01:00
gdb-stub.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
genex.S [MIPS] Fast path for rdhwr emulation for TLS 2006-11-30 01:14:44 +00:00
head.S [MIPS] Qemu now has an ELF loader. 2006-12-09 01:04:00 +00:00
i8253.c
i8259.c [MIPS] Import updates from i386's i8259.c 2006-12-06 20:16:09 +00:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
irix5sys.S
irixelf.c [PATCH] add process_session() helper routine 2006-12-08 08:28:51 -08:00
irixinv.c
irixioctl.c
irixsig.c [MIPS] Move definition of IRIX compat constant into IRIX compat code. 2006-09-27 13:37:45 +01:00
irq_cpu.c [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
irq-msc01.c [MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq 2006-11-30 01:14:46 +00:00
irq-mv6434x.c [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
irq-rm7000.c [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
irq-rm9000.c [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
irq.c [MIPS] genirq: use name instead of typename 2006-12-06 20:16:08 +00:00
kspd.c [PATCH] fdtable: Make fdarray and fdsets equal in size 2006-12-10 09:57:22 -08:00
linux32.c [MIPS] Use SYSVIPC_COMPAT to fix various problems on N32 2006-12-04 22:43:12 +00:00
machine_kexec.c [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
Makefile [MIPS] Remove duplicate ISA DMA code for 0 DMA channel case. 2006-11-30 01:14:51 +00:00
mips_ksyms.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mips-mt.c [MIPS] MIPS MT: Fix build error. 2006-07-13 21:26:06 +01:00
module.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00
proc.c [MIPS] Make sure cpu_has_fpu is used only in atomic context 2006-10-09 23:20:48 +01:00
process.c [MIPS] Use kallsyms_lookup_size_offset() instead of kallsyms_lookup() 2006-10-19 17:55:12 +01:00
ptrace32.c [MIPS] Make sure cpu_has_fpu is used only in atomic context 2006-10-09 23:20:48 +01:00
ptrace.c [MIPS] Make sure cpu_has_fpu is used only in atomic context 2006-10-09 23:20:48 +01:00
r4k_fpu.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
r4k_switch.S [MIPS] 16K & 64K page size fixes 2006-11-01 17:46:09 +00:00
r2300_fpu.S
r2300_switch.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
r6000_fpu.S
relocate_kernel.S [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
reset.c [MIPS] Export pm_power_off 2006-12-10 21:52:11 +00:00
rtlx.c [PATCH] struct path: convert mips 2006-12-08 08:28:47 -08:00
scall32-o32.S [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
scall64-64.S [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
scall64-n32.S [MIPS] Use SYSVIPC_COMPAT to fix various problems on N32 2006-12-04 22:43:12 +00:00
scall64-o32.S [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
semaphore.c
setup.c [MIPS] setup.c: clean up initrd related code 2006-11-30 01:14:42 +00:00
signal32.c [MIPS] Avoid double signal restarting. 2006-09-27 13:37:33 +01:00
signal_n32.c [MIPS] Fix double inclusions 2006-11-30 01:14:47 +00:00
signal-common.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
signal.c [MIPS] Avoid double signal restarting. 2006-09-27 13:37:33 +01:00
smp-mt.c [MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq 2006-11-30 01:14:46 +00:00
smp.c [MIPS] Cleanup memory barriers for weakly ordered systems. 2006-12-04 22:43:14 +00:00
smtc-asm.S [MIPS] SMTC: Fix crash if # of TC's > # of VPE's after pt_regs irq cleanup. 2006-11-01 17:46:09 +00:00
smtc-proc.c [MIPS] MT: Improved multithreading support. 2006-04-19 04:14:28 +02:00
smtc.c [MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq 2006-11-30 01:14:46 +00:00
stacktrace.c [MIPS] save_context_stack fix 2006-10-19 17:55:13 +01:00
syscall.c [PATCH] provide kernel_execve on all architectures 2006-10-02 07:57:23 -07:00
sysirix.c [PATCH] struct path: convert mips 2006-12-08 08:28:47 -08:00
time.c [MIPS] mips HPT cleanup: make clocksource_mips public 2006-11-30 01:14:49 +00:00
topology.c [MIPS] Do topology_init even on uniprocessor kernels. 2006-11-29 16:21:34 +00:00
traps.c [MIPS] Use conditional traps for BUG_ON on MIPS II and better. 2006-11-30 01:14:50 +00:00
unaligned.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vmlinux.lds.S [MIPS] Discard .exit.text and .exit.data at runtime. 2006-12-12 01:46:24 +00:00
vpe.c [PATCH] struct path: convert mips 2006-12-08 08:28:47 -08:00