summaryrefslogtreecommitdiff
path: root/libc/patches/08-sysdeps-generic-dl-sysdep.patch
blob: 9ded9d7781f7bc493abda4a6d0550f80dc5ea05b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /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  <drepper@redhat.com>

	* 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  <roland@frob.com>

	* 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)