android_kernel_samsung_msm8976/arch/i386/kernel
Roland McGrath 0b0bf7a3cc [PATCH] vDSO hash-style fix
The latest toolchains can produce a new ELF section in DSOs and
dynamically-linked executables.  The new section ".gnu.hash" replaces
".hash", and allows for more efficient runtime symbol lookups by the
dynamic linker.  The new ld option --hash-style={sysv|gnu|both} controls
whether to produce the old ".hash", the new ".gnu.hash", or both.  In some
new systems such as Fedora Core 6, gcc by default passes --hash-style=gnu
to the linker, so that a standard invocation of "gcc -shared" results in
producing a DSO with only ".gnu.hash".  The new ".gnu.hash" sections need
to be dealt with the same way as ".hash" sections in all respects; only the
dynamic linker cares about their contents.  To work with older dynamic
linkers (i.e.  preexisting releases of glibc), a binary must have the old
".hash" section.  The --hash-style=both option produces binaries that a new
dynamic linker can use more efficiently, but an old dynamic linker can
still handle.

The new section runs afoul of the custom linker scripts used to build vDSO
images for the kernel.  On ia64, the failure mode for this is a boot-time
panic because the vDSO's PT_IA_64_UNWIND segment winds up ill-formed.

This patch addresses the problem in two ways.

First, it mentions ".gnu.hash" in all the linker scripts alongside ".hash".
 This produces correct vDSO images with --hash-style=sysv (or old tools),
with --hash-style=gnu, or with --hash-style=both.

Second, it passes the --hash-style=sysv option when building the vDSO
images, so that ".gnu.hash" is not actually produced.  This is the most
conservative choice for compatibility with any old userland.  There is some
concern that some ancient glibc builds (though not any known old production
system) might choke on --hash-style=both binaries.  The optimizations
provided by the new style of hash section do not really matter for a DSO
with a tiny number of symbols, as the vDSO has.  If someone wants to use
=gnu or =both for their vDSO builds and worry less about that
compatibility, just change the option and the linker script changes will
make any choice work fine.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-31 13:28:43 -07:00
..
acpi Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpu [PATCH] cpu hotplug: use hotplug version of registration in late inits 2006-07-31 13:28:39 -07:00
.gitignore [PATCH] x86: gitignore some autogenerated files for i386 2006-02-14 16:09:35 -08:00
alternative.c [PATCH] lockdep: x86 smp alternatives workaround 2006-07-03 15:27:04 -07:00
apic.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
apm.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
asm-offsets.c [PATCH] vdso: randomize the i386 vDSO by moving it into a vma 2006-06-27 17:32:38 -07:00
audit.c [PATCH] audit syscall classes 2006-07-01 07:44:10 -04:00
bootflag.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpuid.c [PATCH] Fix modular cpuid.ko 2006-07-03 21:25:20 -07:00
crash.c [PATCH] i386 kexec: allow the kexec on panic support to compile on voyager 2006-07-14 21:53:51 -07:00
crash_dump.c [PATCH] kdump: read previous kernel's memory 2006-01-10 08:01:28 -08:00
doublefault.c [PATCH] i386: cpu_relax() in crash.c and doublefault.c 2006-06-25 10:00:55 -07:00
early_printk.c
efi.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
efi_stub.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
entry.S [PATCH] lockdep: irqtrace subsystem, i386 support 2006-07-03 15:27:03 -07:00
head.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
hpet.c [PATCH] generic-time: add macro to simplify/hide mask constants 2006-06-26 09:58:21 -07:00
i386_ksyms.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i387.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i8237.c [PATCH] ISA DMA suspend for i386 2005-09-05 00:06:14 -07:00
i8253.c [PATCH] time: fix time going backward w/ clock=pit 2006-06-26 09:58:21 -07:00
i8259.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
init_task.c [PATCH] Change maxaligned_in_smp alignemnt macros to internodealigned_in_smp macros 2006-01-08 20:13:38 -08:00
io_apic.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ioport.c [PATCH] i386: use thread_info flags for debug regs and IO bitmaps 2006-07-09 18:47:12 -07:00
irq.c [PATCH] lockdep: irqtrace subsystem, i386 support 2006-07-03 15:27:03 -07:00
kprobes.c [PATCH] kprobe-booster: disable in preemptible kernel 2006-07-31 13:28:38 -07:00
ldt.c [PATCH] arch/i386/kernel/ldt.c should #include <asm/mmu_context.h> 2005-11-07 07:53:29 -08:00
machine_kexec.c [PATCH] machine_kexec.c: Fix the description of segment handling 2006-07-31 13:28:38 -07:00
Makefile [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
mca.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
microcode.c [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed 2006-06-26 12:25:08 -07:00
module.c [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
mpparse.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
msr.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
nmi.c [PATCH] IDE: Touch NMI watchdog during resume from STR 2006-07-31 13:28:39 -07:00
numaq.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
pci-dma.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
process.c [PATCH] i386: switch_to(): misplaced parentheses 2006-07-28 19:22:35 -07:00
ptrace.c [PATCH] i386: use thread_info flags for debug regs and IO bitmaps 2006-07-09 18:47:12 -07:00
quirks.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
reboot.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
reboot_fixups.c [PATCH] i386: Remove printk about reboot fixups at reboot 2006-04-09 11:53:53 -07:00
relocate_kernel.S [PATCH] kexec: x86 kexec core 2005-06-25 16:24:49 -07:00
scx200.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
semaphore.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup.c [PATCH] Fix a memory leak in the i386 setup code 2006-07-14 21:53:51 -07:00
sigframe.h [PATCH] __user annotations for pointers in i386 sigframe 2005-09-09 10:31:59 -07:00
signal.c [PATCH] vdso: randomize the i386 vDSO by moving it into a vma 2006-06-27 17:32:38 -07:00
smp.c [PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR 2006-06-26 10:48:22 -07:00
smpboot.c [PATCH] synchronize_tsc() fixes 2006-07-31 13:28:38 -07:00
srat.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
stacktrace.c [PATCH] lockdep: stacktrace subsystem, i386 support 2006-07-03 15:27:02 -07:00
summit.c
sys_i386.c [PATCH] Uninline sys_mmap common code (reduce binary size) 2006-03-22 07:54:02 -08:00
syscall_table.S [PATCH] sys_move_pages: 32bit support (i386, x86_64) 2006-06-23 07:42:53 -07:00
sysenter.c [PATCH] small fix for not releasing the mmap semaphore in i386/arch_setup_additional_pages 2006-06-28 12:05:50 -07:00
time.c [PATCH] i386/x86-64: Add user_mode checks to profile_pc for oprofile 2006-07-28 19:28:00 -07:00
time_hpet.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
topology.c [PATCH] node hotplug: register cpu: remove node struct 2006-06-27 17:32:37 -07:00
trampoline.S
traps.c [PATCH] panic_on_oops: remove ssleep() 2006-07-31 13:28:39 -07:00
tsc.c [PATCH] generic-time: add macro to simplify/hide mask constants 2006-06-26 09:58:21 -07:00
vm86.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vmlinux.lds.S [PATCH] i386: reliable stack trace support (i386) 2006-06-26 10:48:17 -07:00
vsyscall-int80.S
vsyscall-note.S
vsyscall-sigreturn.S [PATCH] Mark unwind info for signal trampolines in vDSOs 2006-03-31 12:18:52 -08:00
vsyscall-sysenter.S [PATCH] vdso: randomize the i386 vDSO by moving it into a vma 2006-06-27 17:32:38 -07:00
vsyscall.lds.S [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
vsyscall.S