Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 114008 | Differences between
and this patch

Collapse All | Expand All

(-)glibc-2.3.6.orig/elf/dl-load.c (+3 lines)
Lines 1150-1155 Link Here
1150
	    goto call_lose_errno;
1150
	    goto call_lose_errno;
1151
	  }
1151
	  }
1152
1152
1153
	if (GLRO(dl_madvise))
1154
	  __madvise ((void *) l->l_map_start, maplength, MADV_WILLNEED);
1155
1153
	l->l_map_end = l->l_map_start + maplength;
1156
	l->l_map_end = l->l_map_start + maplength;
1154
	l->l_addr = l->l_map_start - c->mapstart;
1157
	l->l_addr = l->l_map_start - c->mapstart;
1155
1158
(-)glibc-2.3.6.orig/elf/dl-support.c (+4 lines)
Lines 48-53 Link Here
48
/* If nonzero print warnings about problematic situations.  */
48
/* If nonzero print warnings about problematic situations.  */
49
int _dl_verbose;
49
int _dl_verbose;
50
50
51
int _dl_madvise;
52
51
/* We never do profiling.  */
53
/* We never do profiling.  */
52
const char *_dl_profile;
54
const char *_dl_profile;
53
const char *_dl_profile_output;
55
const char *_dl_profile_output;
Lines 243-248 Link Here
243
245
244
  _dl_direct = *(getenv ("LD_BIND_DIRECT") ?: "") == '\0';
246
  _dl_direct = *(getenv ("LD_BIND_DIRECT") ?: "") == '\0';
245
247
248
  _dl_madvise = *(getenv ("LD_NOMADVISE") ?: "") == '\0';
249
246
  _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0';
250
  _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0';
247
251
248
  _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0';
252
  _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0';
(-)glibc-2.3.6.orig/elf/rtld.c (+9 lines)
Lines 125-130 Link Here
125
    ._dl_lazy = 1,
125
    ._dl_lazy = 1,
126
    ._dl_direct = 0,
126
    ._dl_direct = 0,
127
    ._dl_fpu_control = _FPU_DEFAULT,
127
    ._dl_fpu_control = _FPU_DEFAULT,
128
    ._dl_madvise = 1,
128
129
129
    /* Function pointers.  */
130
    /* Function pointers.  */
130
    ._dl_get_origin = _dl_get_origin,
131
    ._dl_get_origin = _dl_get_origin,
Lines 2155-2160 Link Here
2155
	  break;
2156
	  break;
2156
2157
2157
	case 9:
2158
	case 9:
2159
	  /* Test whether we should not advise the kernel
2160
	     about memory usage.  */
2161
	  if (memcmp (envline, "NOMADVISE", 9) == 0)
2162
	    {
2163
	      GLRO(dl_madvise) = envline[10] == '\0';
2164
	      break;
2165
	    }
2166
2158
	  /* Test whether we want to see the content of the auxiliary
2167
	  /* Test whether we want to see the content of the auxiliary
2159
	     array passed up from the kernel.  */
2168
	     array passed up from the kernel.  */
2160
	  if (!INTUSE(__libc_enable_secure)
2169
	  if (!INTUSE(__libc_enable_secure)
(-)glibc-2.3.6.orig/include/sys/mman.h (+1 lines)
Lines 8-13 Link Here
8
		       int __flags, int __fd, __off64_t __offset);
8
		       int __flags, int __fd, __off64_t __offset);
9
extern int __munmap (void *__addr, size_t __len);
9
extern int __munmap (void *__addr, size_t __len);
10
extern int __mprotect (void *__addr, size_t __len, int __prot);
10
extern int __mprotect (void *__addr, size_t __len, int __prot);
11
extern int __madvise (void *__addr, size_t __len, int __advise);
11
12
12
/* This one is Linux specific.  */
13
/* This one is Linux specific.  */
13
extern void *__mremap (void *__addr, size_t __old_len,
14
extern void *__mremap (void *__addr, size_t __old_len,
(-)glibc-2.3.6.orig/sysdeps/generic/ldsodefs.h (+3 lines)
Lines 417-422 Link Here
417
  /* Do we do direct relocations?  */
417
  /* Do we do direct relocations?  */
418
  EXTERN int _dl_direct;
418
  EXTERN int _dl_direct;
419
419
420
  /* Should we advise kernel about memory usage? */
421
  EXTERN int _dl_madvise;
422
420
  /* Nonzero if runtime lookups should not update the .got/.plt.  */
423
  /* Nonzero if runtime lookups should not update the .got/.plt.  */
421
  EXTERN int _dl_bind_not;
424
  EXTERN int _dl_bind_not;
422
425
(-)glibc-2.3.6.orig/sysdeps/unix/sysv/linux/syscalls.list (-1 / +1 lines)
Lines 31-37 Link Here
31
klogctl		EXTRA	syslog		i:isi	klogctl
31
klogctl		EXTRA	syslog		i:isi	klogctl
32
lchown		-	lchown		i:sii	__lchown	lchown
32
lchown		-	lchown		i:sii	__lchown	lchown
33
posix_madvise	-	madvise		Vi:pii	posix_madvise
33
posix_madvise	-	madvise		Vi:pii	posix_madvise
34
madvise		-	madvise		i:pii	madvise
34
madvise		-	madvise		i:pii	__madvise	madvise
35
mincore		-	mincore		i:anV	mincore
35
mincore		-	mincore		i:anV	mincore
36
mlock		-	mlock		i:bn	mlock
36
mlock		-	mlock		i:bn	mlock
37
mlockall	-	mlockall	i:i	mlockall
37
mlockall	-	mlockall	i:i	mlockall

Return to bug 114008