Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / arch / i386 / kernel / vsyscall-note-xen.S
1 /*
2  * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
3  * Here we can supply some information useful to userland.
4  * First we get the vanilla i386 note that supplies the kernel version info.
5  */
6
7 #include "vsyscall-note.S"
8
9 /*
10  * Now we add a special note telling glibc's dynamic linker a fake hardware
11  * flavor that it will use to choose the search path for libraries in the
12  * same way it uses real hardware capabilities like "mmx".
13  * We supply "nosegneg" as the fake capability, to indicate that we
14  * do not like negative offsets in instructions using segment overrides,
15  * since we implement those inefficiently.  This makes it possible to
16  * install libraries optimized to avoid those access patterns in someplace
17  * like /lib/i686/tls/nosegneg.  Note that an /etc/ld.so.conf.d/file
18  * corresponding to the bits here is needed to make ldconfig work right.
19  * It should contain:
20  *      hwcap 0 nosegneg
21  * to match the mapping of bit to name that we give here.
22  */
23 #define NOTE_KERNELCAP_BEGIN(ncaps, mask) \
24         ASM_ELF_NOTE_BEGIN(".note.kernelcap", "a", "GNU", 2) \
25         .long ncaps, mask
26 #define NOTE_KERNELCAP(bit, name) \
27         .byte bit; .asciz name
28 #define NOTE_KERNELCAP_END ASM_ELF_NOTE_END
29
30 NOTE_KERNELCAP_BEGIN(1, 1)
31 NOTE_KERNELCAP(1, "nosegneg")  /* Change 1 back to 0 when glibc is fixed! */
32 NOTE_KERNELCAP_END