#! /bin/sh patch -p1 -f $* < $0 exit $? This patch is needed to prevent a missing symbol error when linking. It goes against this change in ChangeLog.13 though: 2001-11-05 Ulrich Drepper * sysdeps/generic/dl-sysdep.c: Don't initialize _dl_cpuclock_offset. As I don't understand the issue, I can't suggest to apply this patch officially. We will have our own dl-sysdep.c at some point though, and this will be part of it, just like: 2002-08-18 Roland McGrath * sysdeps/mach/hurd/dl-sysdep.c [HP_TIMING_AVAIL] (_dl_cpuclock_offset): New variable. [HP_TIMING_AVAIL] (_dl_sysdep_start): Set it with HP_TIMING_NOW. --- libc/sysdeps/generic/dl-sysdep.c 2004-11-08 16:43:17.000000000 +0100 +++ libc/sysdeps/generic/dl-sysdep.c 2005-01-25 23:36:44.000000000 +0100 @@ -57,6 +57,10 @@ void *__libc_stack_end attribute_relro = rtld_hidden_data_def(__libc_stack_end) static ElfW(auxv_t) *_dl_auxv attribute_relro; +#if HP_TIMING_AVAIL +hp_timing_t _dl_cpuclock_offset; +#endif + #ifndef DL_FIND_ARG_COMPONENTS # define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \ do { \ @@ -201,6 +205,10 @@ _dl_sysdep_start (void **start_argptr, GLRO(dl_pagesize) = __getpagesize (); #endif +#if HP_TIMING_AVAIL + HP_TIMING_NOW (_dl_cpuclock_offset); +#endif + #if defined NEED_DL_SYSINFO /* Only set the sysinfo value if we also have the vsyscall DSO. */ if (GLRO(dl_sysinfo_dso) != 0 && new_sysinfo)