This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] Xen-friendly glibc selection: appropriate ld-linux can p

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Xen-friendly glibc selection: appropriate ld-linux can parse
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 08 Oct 2005 09:02:10 +0000
Delivery-date: Sat, 08 Oct 2005 08:59:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 32c3658d73916f127e19e8c77ca34ec49b9ab64c
# Parent  f1abe953e4019c023cccec46560052df7261828d
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@xxxxxxxxxx>
Signed-off-by: Roland McGrath <roland@xxxxxxxxxx>

diff -r f1abe953e401 -r 32c3658d7391 
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile        Fri Oct  7 
22:36:26 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile        Sat Oct  8 
08:49:28 2005
@@ -86,7 +86,7 @@
        $(call if_changed,syscall)
 c-link :=
-s-link := vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o 
vsyscall.lds.o vsyscall-note.o
+s-link := vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o 
 $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-obj-m) $(c-link)) $(patsubst 
%.o,$(obj)/%.S,$(s-obj-y) $(s-link)):
        @ln -fsn $(srctree)/arch/i386/kernel/$(notdir $@) $@
diff -r f1abe953e401 -r 32c3658d7391 
--- /dev/null   Fri Oct  7 22:36:26 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/vsyscall-note.S Sat Oct  8 
08:49:28 2005
@@ -0,0 +1,32 @@
+ * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
+ * Here we can supply some information useful to userland.
+ * First we get the vanilla i386 note that supplies the kernel version info.
+ */
+#include "../../../i386/kernel/vsyscall-note.S"
+ * Now we add a special note telling glibc's dynamic linker a fake hardware
+ * flavor that it will use to choose the search path for libraries in the
+ * same way it uses real hardware capabilities like "mmx".
+ * We supply "nosegneg" as the fake capability, to indicate that we
+ * do not like negative offsets in instructions using segment overrides,
+ * since we implement those inefficiently.  This makes it possible to
+ * install libraries optimized to avoid those access patterns in someplace
+ * like /lib/i686/tls/nosegneg.  Note that an /etc/ld.so.conf.d/file
+ * corresponding to the bits here is needed to make ldconfig work right.
+ * It should contain:
+ *     hwcap 0 nosegneg
+ * to match the mapping of bit to name that we give here.
+ */
+#define NOTE_KERNELCAP_BEGIN(ncaps, mask) \
+       ASM_ELF_NOTE_BEGIN(".note.kernelcap", "a", "GNU", 2) \
+       .long ncaps, mask
+#define NOTE_KERNELCAP(bit, name) \
+       .byte bit; .asciz name
+NOTE_KERNELCAP(1, "nosegneg")  /* Change 1 back to 0 when glibc is fixed! */

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Xen-friendly glibc selection: appropriate ld-linux can parse, Xen patchbot -unstable <=