[Glibc-bsd-commits] r2577 - in trunk/kfreebsd-7/debian: . patches

Petr Salinger ps-guest at alioth.debian.org
Thu Jun 11 08:49:26 UTC 2009


Author: ps-guest
Date: 2009-06-11 08:49:24 +0000 (Thu, 11 Jun 2009)
New Revision: 2577

Added:
   trunk/kfreebsd-7/debian/patches/011_brandinfo.diff
Modified:
   trunk/kfreebsd-7/debian/changelog
   trunk/kfreebsd-7/debian/patches/series
Log:
 011_brandinfo.diff: fix the way a binary type is detected.
    The original upstream change in 7.2 prevented 32-bit binaries to work.
    It broke biarch support on kfreebsd-amd64 and whole kfreebsd-i386.



Modified: trunk/kfreebsd-7/debian/changelog
===================================================================
--- trunk/kfreebsd-7/debian/changelog	2009-06-08 17:06:28 UTC (rev 2576)
+++ trunk/kfreebsd-7/debian/changelog	2009-06-11 08:49:24 UTC (rev 2577)
@@ -1,3 +1,13 @@
+kfreebsd-7 (7.2-2) UNSTABLE; urgency=low
+
+  [ Petr Salinger ]
+  * 011_brandinfo.diff: fix the way a binary type is detected.
+    The original upstream change in 7.2 prevented 32-bit binaries to work.
+    It broke biarch support on kfreebsd-amd64 and whole kfreebsd-i386.
+    Closes: #532627.
+
+ -- Aurelien Jarno <aurel32 at debian.org>  Sun, 31 May 2009 21:35:04 +0200
+
 kfreebsd-7 (7.2-1) unstable; urgency=low
 
   [ Petr Salinger ]

Added: trunk/kfreebsd-7/debian/patches/011_brandinfo.diff
===================================================================
--- trunk/kfreebsd-7/debian/patches/011_brandinfo.diff	                        (rev 0)
+++ trunk/kfreebsd-7/debian/patches/011_brandinfo.diff	2009-06-11 08:49:24 UTC (rev 2577)
@@ -0,0 +1,69 @@
+Upstream checks the .note.ABI-tag in a bad way.
+They should not only check the "GNU", but also whether OS field matches.
+In both cases they should check 8 bytes, we can use it for current hack.
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532627
+
+
+
+Index: src/sys/amd64/linux32/linux32_sysvec.c
+===================================================================
+--- src.orig/sys/amd64/linux32/linux32_sysvec.c
++++ src/sys/amd64/linux32/linux32_sysvec.c
+@@ -1047,10 +1047,10 @@
+ 	.sv_maxssiz	= &linux32_maxssiz,
+ };
+ 
+-static char GNULINUX_ABI_VENDOR[] = "GNU";
++static char GNULINUX_ABI_VENDOR[] = "GNU\0\0\0\0\0";
+ 
+ static Elf_Brandnote linux32_brandnote = {
+-	.hdr.n_namesz	= sizeof(GNULINUX_ABI_VENDOR),
++	.hdr.n_namesz	= 4,
+ 	.hdr.n_descsz	= 16,
+ 	.hdr.n_type	= 1,
+ 	.vendor		= GNULINUX_ABI_VENDOR,
+Index: src/sys/i386/linux/linux_sysvec.c
+===================================================================
+--- src.orig/sys/i386/linux/linux_sysvec.c
++++ src/sys/i386/linux/linux_sysvec.c
+@@ -1017,10 +1017,10 @@
+ 	.sv_maxssiz	= NULL
+ };
+ 
+-static char GNULINUX_ABI_VENDOR[] = "GNU";
++static char GNULINUX_ABI_VENDOR[] = "GNU\0\0\0\0\0";
+ 
+ static Elf_Brandnote linux_brandnote = {
+-	.hdr.n_namesz	= sizeof(GNULINUX_ABI_VENDOR),
++	.hdr.n_namesz	= 4,
+ 	.hdr.n_descsz	= 16,
+ 	.hdr.n_type	= 1,
+ 	.vendor		= GNULINUX_ABI_VENDOR,
+Index: src/sys/kern/imgact_elf.c
+===================================================================
+--- src.orig/sys/kern/imgact_elf.c
++++ src/sys/kern/imgact_elf.c
+@@ -112,10 +112,10 @@
+ #define	round_page_ps(va, ps)	(((va) + (ps - 1)) & ~(ps - 1))
+ #define	aligned(a, t)	(trunc_page_ps((u_long)(a), sizeof(t)) == (u_long)(a))
+ 
+-static const char FREEBSD_ABI_VENDOR[] = "FreeBSD";
++static const char FREEBSD_ABI_VENDOR[] = "FreeBSD\0";
+ 
+ Elf_Brandnote __elfN(freebsd_brandnote) = {
+-	.hdr.n_namesz	= sizeof(FREEBSD_ABI_VENDOR),
++	.hdr.n_namesz	= 8,
+ 	.hdr.n_descsz	= sizeof(int32_t),
+ 	.hdr.n_type	= 1,
+ 	.vendor		= FREEBSD_ABI_VENDOR,
+@@ -1393,8 +1393,7 @@
+ 		    note->n_type != checknote->hdr.n_type)
+ 			goto nextnote;
+ 		note_name = (const char *)(note + 1);
+-		if (strncmp(checknote->vendor, note_name,
+-		    checknote->hdr.n_namesz) != 0)
++		if (memcmp(checknote->vendor, note_name, 8) != 0)
+ 			goto nextnote;
+ 
+ 		/*

Modified: trunk/kfreebsd-7/debian/patches/series
===================================================================
--- trunk/kfreebsd-7/debian/patches/series	2009-06-08 17:06:28 UTC (rev 2576)
+++ trunk/kfreebsd-7/debian/patches/series	2009-06-11 08:49:24 UTC (rev 2577)
@@ -6,6 +6,7 @@
 008_config.diff
 009_disable_duped_modules.diff
 010_ET_DYN.diff
+011_brandinfo.diff
 013_ip_packed.diff
 017_oss_compat.diff
 020_linker.diff 




More information about the Glibc-bsd-commits mailing list