[Glibc-bsd-commits] r2583 - trunk/glibc-ports/kfreebsd
Petr Salinger
ps-guest at alioth.debian.org
Thu Jun 11 15:26:44 UTC 2009
Author: ps-guest
Date: 2009-06-11 15:26:44 +0000 (Thu, 11 Jun 2009)
New Revision: 2583
Modified:
trunk/glibc-ports/kfreebsd/dl-sysdep.c
trunk/glibc-ports/kfreebsd/kernel-features.h
Log:
* document the reason for used encoding of __KFREEBSD_KERNEL_VERSION
Modified: trunk/glibc-ports/kfreebsd/dl-sysdep.c
===================================================================
--- trunk/glibc-ports/kfreebsd/dl-sysdep.c 2009-06-11 13:37:23 UTC (rev 2582)
+++ trunk/glibc-ports/kfreebsd/dl-sysdep.c 2009-06-11 15:26:44 UTC (rev 2583)
@@ -52,5 +52,5 @@
/* Convert to the GLIBC versioning system */
return ((version / 100000) << 16) /* major */
| (((version % 100000) / 1000) << 8) /* minor 0 - 99 */
- | ((version % 1000)); /* subrelease 0 - 199 */
+ | ((version % 200)); /* subrelease 0 - 199 */
}
Modified: trunk/glibc-ports/kfreebsd/kernel-features.h
===================================================================
--- trunk/glibc-ports/kfreebsd/kernel-features.h 2009-06-11 13:37:23 UTC (rev 2582)
+++ trunk/glibc-ports/kfreebsd/kernel-features.h 2009-06-11 15:26:44 UTC (rev 2583)
@@ -35,8 +35,16 @@
introduced. If somebody cares these values can afterwards be
corrected. */
-/*
- Beware, the __KFREEBSD_KERNEL_VERSION have different value compared to
+/*
+ The used encoding corresponds to the following in elf/dl-load.c:
+
+ osversion = (abi_note[5] & 0xff) * 65536
+ + (abi_note[6] & 0xff) * 256
+ + (abi_note[7] & 0xff);
+ if (abi_note[4] != __ABI_TAG_OS
+ || (GLRO(dl_osversion) && GLRO(dl_osversion) < osversion))
+
+ Therefore, the __KFREEBSD_KERNEL_VERSION have different value compared to
__FreeBSD_version/__FreeBSD_kernel__version.
The transformation is not just prepend 0x to __FreeBSD_kernel_version.
More information about the Glibc-bsd-commits
mailing list