ia64/xen-unstable
changeset 7273:32c3658d7391
Xen-friendly glibc selection: appropriate ld-linux can parse
the vsyscall page ELF notes and use the "nosegneg" glibc variant
to ensure that things work fine.
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Roland McGrath <roland@redhat.com>
the vsyscall page ELF notes and use the "nosegneg" glibc variant
to ensure that things work fine.
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Roland McGrath <roland@redhat.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Sat Oct 08 09:49:28 2005 +0100 (2005-10-08) |
parents | f1abe953e401 |
children | a4df9003c54d |
files | linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/vsyscall-note.S |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile Fri Oct 07 23:36:26 2005 +0100 1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile Sat Oct 08 09:49:28 2005 +0100 1.3 @@ -86,7 +86,7 @@ SYSCFLAGS_vsyscall-syms.o = -r 1.4 $(call if_changed,syscall) 1.5 1.6 c-link := 1.7 -s-link := vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o vsyscall.lds.o vsyscall-note.o 1.8 +s-link := vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o vsyscall.lds.o 1.9 1.10 $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-obj-m) $(c-link)) $(patsubst %.o,$(obj)/%.S,$(s-obj-y) $(s-link)): 1.11 @ln -fsn $(srctree)/arch/i386/kernel/$(notdir $@) $@
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/vsyscall-note.S Sat Oct 08 09:49:28 2005 +0100 2.3 @@ -0,0 +1,32 @@ 2.4 +/* 2.5 + * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text. 2.6 + * Here we can supply some information useful to userland. 2.7 + * First we get the vanilla i386 note that supplies the kernel version info. 2.8 + */ 2.9 + 2.10 +#include "../../../i386/kernel/vsyscall-note.S" 2.11 + 2.12 +/* 2.13 + * Now we add a special note telling glibc's dynamic linker a fake hardware 2.14 + * flavor that it will use to choose the search path for libraries in the 2.15 + * same way it uses real hardware capabilities like "mmx". 2.16 + * We supply "nosegneg" as the fake capability, to indicate that we 2.17 + * do not like negative offsets in instructions using segment overrides, 2.18 + * since we implement those inefficiently. This makes it possible to 2.19 + * install libraries optimized to avoid those access patterns in someplace 2.20 + * like /lib/i686/tls/nosegneg. Note that an /etc/ld.so.conf.d/file 2.21 + * corresponding to the bits here is needed to make ldconfig work right. 2.22 + * It should contain: 2.23 + * hwcap 0 nosegneg 2.24 + * to match the mapping of bit to name that we give here. 2.25 + */ 2.26 +#define NOTE_KERNELCAP_BEGIN(ncaps, mask) \ 2.27 + ASM_ELF_NOTE_BEGIN(".note.kernelcap", "a", "GNU", 2) \ 2.28 + .long ncaps, mask 2.29 +#define NOTE_KERNELCAP(bit, name) \ 2.30 + .byte bit; .asciz name 2.31 +#define NOTE_KERNELCAP_END ASM_ELF_NOTE_END 2.32 + 2.33 +NOTE_KERNELCAP_BEGIN(1, 1) 2.34 +NOTE_KERNELCAP(1, "nosegneg") /* Change 1 back to 0 when glibc is fixed! */ 2.35 +NOTE_KERNELCAP_END