Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 301642
Collapse All | Expand All

(-)glibc-2.11.2.orig/ChangeLog (+8 lines)
Lines 211-216 Link Here
211
	* io/ftw.c (ftw_startup): Close	descriptor for initial directory
211
	* io/ftw.c (ftw_startup): Close	descriptor for initial directory
212
	after changing back to it.
212
	after changing back to it.
213
213
214
2010-02-09  Carlos O'Donell  <carlos@codesourcery.com>
215
216
	* elf/dl-fptr.c: Update copyright year.
217
	(struct local): Don't initialize root.
218
	(make_fdesc): Initialize root table pointer.
219
	(_dl_fptr_init): New function.
220
	* sysdeps/generic/dl-fptr.h (_dl_fptr_init): New prototype. 
221
214
2010-02-09  Ulrich Drepper  <drepper@redhat.com>
222
2010-02-09  Ulrich Drepper  <drepper@redhat.com>
215
223
216
	* sysdeps/i386/lshift.S: Fix unwind information.
224
	* sysdeps/i386/lshift.S: Fix unwind information.
(-)glibc-2.11.2.orig/elf/dl-fptr.c (-2 / +14 lines)
Lines 1-5 Link Here
1
/* Manage function descriptors.  Generic version.
1
/* Manage function descriptors.  Generic version.
2
   Copyright (C) 1999-2004, 2006 Free Software Foundation, Inc.
2
   Copyright (C) 1999-2004, 2006, 2010 Free Software Foundation, Inc.
3
   This file is part of the GNU C Library.
3
   This file is part of the GNU C Library.
4
4
5
   The GNU C Library is free software; you can redistribute it and/or
5
   The GNU C Library is free software; you can redistribute it and/or
Lines 56-62 Link Here
56
  }
56
  }
57
local =
57
local =
58
  {
58
  {
59
    .root = &local.boot_table,
59
    /* Address of .boot_table is not known until runtime.  */
60
    .root = 0,
60
    .npages = 2,
61
    .npages = 2,
61
    .boot_table =
62
    .boot_table =
62
      {
63
      {
Lines 93-98 Link Here
93
  return new_table;
94
  return new_table;
94
}
95
}
95
96
97
/* Must call _dl_fptr_init before using any other function.  */
98
void 
99
_dl_fptr_init (void)
100
{
101
  struct local *l;
102
103
  ELF_MACHINE_LOAD_ADDRESS (l, local);
104
  /* Initialize root once.  */
105
  if (__builtin_expect (l->root == 0, 0))
106
    l->root = &l->boot_table;
107
}
96
108
97
static ElfW(Addr)
109
static ElfW(Addr)
98
make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp)
110
make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp)
(-)glibc-2.11.2.orig/nptl/ChangeLog (+18 lines)
Lines 1-3 Link Here
1
2010-02-09  Carlos O'Donell  <carlos@codesourcery.com>
2
3
	* allocatestack.c (allocate_stack): Define
4
	_STACK_GROWS_DOWN and _STACK_GROWS_UP cases for
5
	user defined stacks. Adjust define indentation.
6
	Remove assert for _STACK_GROWS_UP case.
7
	* pthread_create.c: Update coprigyt year.
8
	(start_thread): Implement _STACK_GROWS_UP case.
9
	* pthread_attr_getstack.c: Update copyright year.
10
	(__pthread_attr_getstack): Define _STACK_GROWS_UP
11
	case.
12
	* pthread_attr_setstack.c: Update copyright year.
13
	(__pthread_attr_setstack): Define _STACK_GROWS_UP
14
	case.
15
	(__old_pthread_attr_setstack): Likewise.
16
	* pthread_getattr_np: Update copyright year.
17
	(pthread_getattr_np): Define _STACK_GROWS_UP cases.
18
1
2009-11-27  Andreas Schwab  <schwab@redhat.com>
19
2009-11-27  Andreas Schwab  <schwab@redhat.com>
2
20
3
	* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
21
	* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
(-)glibc-2.11.2.orig/nptl/allocatestack.c (-8 / +16 lines)
Lines 1-4 Link Here
1
/* Copyright (C) 2002-2007, 2009 Free Software Foundation, Inc.
1
/* Copyright (C) 2002-2007, 2009, 2010 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
2
   This file is part of the GNU C Library.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
4
4
Lines 354-359 Link Here
354
  if (__builtin_expect (attr->flags & ATTR_FLAG_STACKADDR, 0))
354
  if (__builtin_expect (attr->flags & ATTR_FLAG_STACKADDR, 0))
355
    {
355
    {
356
      uintptr_t adj;
356
      uintptr_t adj;
357
#if _STACK_GROWS_DOWN
358
      char * stackaddr = (char *) attr->stackaddr;
359
#else
360
      /* Assume the same layout as the _STACK_GROWS_DOWN case, 
361
	 with struct pthread at the top of the stack block. 
362
	 Later we adjust the guard location and stack address 
363
	 to match the _STACK_GROWS_UP case.  */
364
      char * stackaddr = (char *) attr->stackaddr + attr->stacksize;
365
#endif
357
366
358
      /* If the user also specified the size of the stack make sure it
367
      /* If the user also specified the size of the stack make sure it
359
	 is large enough.  */
368
	 is large enough.  */
Lines 363-373 Link Here
363
372
364
      /* Adjust stack size for alignment of the TLS block.  */
373
      /* Adjust stack size for alignment of the TLS block.  */
365
#if TLS_TCB_AT_TP
374
#if TLS_TCB_AT_TP
366
      adj = ((uintptr_t) attr->stackaddr - TLS_TCB_SIZE)
375
      adj = ((uintptr_t) stackaddr - TLS_TCB_SIZE)
367
	    & __static_tls_align_m1;
376
	    & __static_tls_align_m1;
368
      assert (size > adj + TLS_TCB_SIZE);
377
      assert (size > adj + TLS_TCB_SIZE);
369
#elif TLS_DTV_AT_TP
378
#elif TLS_DTV_AT_TP
370
      adj = ((uintptr_t) attr->stackaddr - __static_tls_size)
379
      adj = ((uintptr_t) stackaddr - __static_tls_size)
371
	    & __static_tls_align_m1;
380
	    & __static_tls_align_m1;
372
      assert (size > adj);
381
      assert (size > adj);
373
#endif
382
#endif
Lines 377-386 Link Here
377
	 the stack.  It is the user's responsibility to do this if it
386
	 the stack.  It is the user's responsibility to do this if it
378
	 is wanted.  */
387
	 is wanted.  */
379
#if TLS_TCB_AT_TP
388
#if TLS_TCB_AT_TP
380
      pd = (struct pthread *) ((uintptr_t) attr->stackaddr
389
      pd = (struct pthread *) ((uintptr_t) stackaddr
381
			       - TLS_TCB_SIZE - adj);
390
			       - TLS_TCB_SIZE - adj);
382
#elif TLS_DTV_AT_TP
391
#elif TLS_DTV_AT_TP
383
      pd = (struct pthread *) (((uintptr_t) attr->stackaddr
392
      pd = (struct pthread *) (((uintptr_t) stackaddr
384
			        - __static_tls_size - adj)
393
			        - __static_tls_size - adj)
385
			       - TLS_PRE_TCB_SIZE);
394
			       - TLS_PRE_TCB_SIZE);
386
#endif
395
#endif
Lines 392-398 Link Here
392
      pd->specific[0] = pd->specific_1stblock;
401
      pd->specific[0] = pd->specific_1stblock;
393
402
394
      /* Remember the stack-related values.  */
403
      /* Remember the stack-related values.  */
395
      pd->stackblock = (char *) attr->stackaddr - size;
404
      pd->stackblock = (char *) stackaddr - size;
396
      pd->stackblock_size = size;
405
      pd->stackblock_size = size;
397
406
398
      /* This is a user-provided stack.  It will not be queued in the
407
      /* This is a user-provided stack.  It will not be queued in the
Lines 617-623 Link Here
617
	  char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
626
	  char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
618
#elif _STACK_GROWS_DOWN
627
#elif _STACK_GROWS_DOWN
619
	  char *guard = mem;
628
	  char *guard = mem;
620
# elif _STACK_GROWS_UP
629
#elif _STACK_GROWS_UP
621
	  char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
630
	  char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
622
#endif
631
#endif
623
	  if (mprotect (guard, guardsize, PROT_NONE) != 0)
632
	  if (mprotect (guard, guardsize, PROT_NONE) != 0)
Lines 716-722 Link Here
716
  *stack = stacktop;
725
  *stack = stacktop;
717
#elif _STACK_GROWS_UP
726
#elif _STACK_GROWS_UP
718
  *stack = pd->stackblock;
727
  *stack = pd->stackblock;
719
  assert (*stack > 0);
720
#endif
728
#endif
721
729
722
  return 0;
730
  return 0;
(-)glibc-2.11.2.orig/nptl/pthread_attr_getstack.c (-1 / +5 lines)
Lines 1-4 Link Here
1
/* Copyright (C) 2002 Free Software Foundation, Inc.
1
/* Copyright (C) 2002, 2010 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
2
   This file is part of the GNU C Library.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
4
4
Lines 33-39 Link Here
33
  iattr = (struct pthread_attr *) attr;
33
  iattr = (struct pthread_attr *) attr;
34
34
35
  /* Store the result.  */
35
  /* Store the result.  */
36
#ifdef _STACK_GROWS_DOWN
36
  *stackaddr = (char *) iattr->stackaddr - iattr->stacksize;
37
  *stackaddr = (char *) iattr->stackaddr - iattr->stacksize;
38
#else
39
  *stackaddr = (char *) iattr->stackaddr;
40
#endif
37
  *stacksize = iattr->stacksize;
41
  *stacksize = iattr->stacksize;
38
42
39
  return 0;
43
  return 0;
(-)glibc-2.11.2.orig/nptl/pthread_attr_setstack.c (-1 / +9 lines)
Lines 1-4 Link Here
1
/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
1
/* Copyright (C) 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
2
   This file is part of the GNU C Library.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
4
4
Lines 48-54 Link Here
48
#endif
48
#endif
49
49
50
  iattr->stacksize = stacksize;
50
  iattr->stacksize = stacksize;
51
#if _STACK_GROWS_DOWN
51
  iattr->stackaddr = (char *) stackaddr + stacksize;
52
  iattr->stackaddr = (char *) stackaddr + stacksize;
53
#else
54
  iattr->stackaddr = (char *) stackaddr;
55
#endif
52
  iattr->flags |= ATTR_FLAG_STACKADDR;
56
  iattr->flags |= ATTR_FLAG_STACKADDR;
53
57
54
  return 0;
58
  return 0;
Lines 81-87 Link Here
81
#  endif
85
#  endif
82
86
83
  iattr->stacksize = stacksize;
87
  iattr->stacksize = stacksize;
88
#if _STACK_GROWS_DOWN
84
  iattr->stackaddr = (char *) stackaddr + stacksize;
89
  iattr->stackaddr = (char *) stackaddr + stacksize;
90
#else
91
  iattr->stackaddr = (char *) stackaddr;
92
#endif
85
  iattr->flags |= ATTR_FLAG_STACKADDR;
93
  iattr->flags |= ATTR_FLAG_STACKADDR;
86
94
87
  return 0;
95
  return 0;
(-)glibc-2.11.2.orig/nptl/pthread_create.c (-4 / +10 lines)
Lines 1-4 Link Here
1
/* Copyright (C) 2002-2007,2008,2009 Free Software Foundation, Inc.
1
/* Copyright (C) 2002-2007,2008,2009,2010 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
2
   This file is part of the GNU C Library.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
4
4
Lines 383-394 Link Here
383
#ifdef _STACK_GROWS_DOWN
383
#ifdef _STACK_GROWS_DOWN
384
  char *sp = CURRENT_STACK_FRAME;
384
  char *sp = CURRENT_STACK_FRAME;
385
  size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1;
385
  size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1;
386
#else
387
# error "to do"
388
#endif
389
  assert (freesize < pd->stackblock_size);
386
  assert (freesize < pd->stackblock_size);
390
  if (freesize > PTHREAD_STACK_MIN)
387
  if (freesize > PTHREAD_STACK_MIN)
391
    madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
388
    madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
389
#else
390
  char *sp = CURRENT_STACK_FRAME;
391
  size_t freesize = ((char *) pd->stackblock + pd->stackblock_size - sp) 
392
		     & ~pagesize_m1;
393
  void *freeblock = (void *) (sp + PTHREAD_STACK_MIN);
394
  assert (freesize < pd->stackblock_size);
395
  if (freesize > PTHREAD_STACK_MIN)
396
    madvise (freeblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
397
#endif
392
398
393
  /* If the thread is detached free the TCB.  */
399
  /* If the thread is detached free the TCB.  */
394
  if (IS_DETACHED (pd))
400
  if (IS_DETACHED (pd))
(-)glibc-2.11.2.orig/nptl/pthread_getattr_np.c (-1 / +14 lines)
Lines 1-4 Link Here
1
/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
1
/* Copyright (C) 2002, 2003, 2004, 2006, 2007, 
2
   2010 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
3
   This file is part of the GNU C Library.
3
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
4
   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
4
5
Lines 61-67 Link Here
61
  if (__builtin_expect (thread->stackblock != NULL, 1))
62
  if (__builtin_expect (thread->stackblock != NULL, 1))
62
    {
63
    {
63
      iattr->stacksize = thread->stackblock_size;
64
      iattr->stacksize = thread->stackblock_size;
65
#ifdef _STACK_GROWS_DOWN
64
      iattr->stackaddr = (char *) thread->stackblock + iattr->stacksize;
66
      iattr->stackaddr = (char *) thread->stackblock + iattr->stacksize;
67
#else
68
      iattr->stackaddr = (char *) thread->stackblock;
69
#endif
65
    }
70
    }
66
  else
71
  else
67
    {
72
    {
Lines 110-122 Link Here
110
		    {
115
		    {
111
		      /* Found the entry.  Now we have the info we need.  */
116
		      /* Found the entry.  Now we have the info we need.  */
112
		      iattr->stacksize = rl.rlim_cur;
117
		      iattr->stacksize = rl.rlim_cur;
118
#ifdef _STACK_GROWS_DOWN
113
		      iattr->stackaddr = (void *) to;
119
		      iattr->stackaddr = (void *) to;
114
120
115
		      /* The limit might be too high.  */
121
		      /* The limit might be too high.  */
116
		      if ((size_t) iattr->stacksize
122
		      if ((size_t) iattr->stacksize
117
			  > (size_t) iattr->stackaddr - last_to)
123
			  > (size_t) iattr->stackaddr - last_to)
118
			iattr->stacksize = (size_t) iattr->stackaddr - last_to;
124
			iattr->stacksize = (size_t) iattr->stackaddr - last_to;
125
#else
126
		      iattr->stackaddr = (void *) from;
119
127
128
		      /* The limit might be too high.  */
129
		      if ((size_t) iattr->stacksize
130
			  > to - (size_t) iattr->stackaddr)
131
			iattr->stacksize = to - (size_t) iattr->stackaddr;
132
#endif
120
		      /* We succeed and no need to look further.  */
133
		      /* We succeed and no need to look further.  */
121
		      ret = 0;
134
		      ret = 0;
122
		      break;
135
		      break;
(-)glibc-2.11.2.orig/ports/ChangeLog.hppa (+5 lines)
Lines 1-3 Link Here
1
2010-02-09  Carlos O'Donell  <carlos@codesourcery.com>
2
3
	* sysdeps/hppa/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC):
4
 	Call _dl_fptr_init.
5
1
2009-11-15  Carlos O'Donell  <carlos@codesourcery.com>
6
2009-11-15  Carlos O'Donell  <carlos@codesourcery.com>
2
7
3
	[BZ #6676]
8
	[BZ #6676]
(-)glibc-2.11.2.orig/ports/sysdeps/hppa/dl-machine.h (-1 / +2 lines)
Lines 64-70 Link Here
64
}
64
}
65
65
66
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info)		\
66
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info)		\
67
	__hppa_init_bootstrap_fdesc_table (&bootstrap_map);
67
	__hppa_init_bootstrap_fdesc_table (&bootstrap_map);	\
68
	_dl_fptr_init();
68
69
69
/* Return nonzero iff ELF header is compatible with the running host.  */
70
/* Return nonzero iff ELF header is compatible with the running host.  */
70
static inline int
71
static inline int
(-)glibc-2.11.2.orig/sysdeps/generic/dl-fptr.h (+3 lines)
Lines 40-45 Link Here
40
40
41
extern ElfW(Addr) _dl_boot_fptr_table [];
41
extern ElfW(Addr) _dl_boot_fptr_table [];
42
42
43
/* Must be called before any other function.  */
44
extern void _dl_fptr_init (void);
45
43
extern ElfW(Addr) _dl_make_fptr (struct link_map *, const ElfW(Sym) *,
46
extern ElfW(Addr) _dl_make_fptr (struct link_map *, const ElfW(Sym) *,
44
				 ElfW(Addr));
47
				 ElfW(Addr));
45
48

Return to bug 301642