~ubuntu-branches/ubuntu/trusty/eglibc/trusty

« back to all changes in this revision

Viewing changes to csu/libc-start.c

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-01-10 18:39:35 UTC
  • mfrom: (1.5.2) (4.4.24 experimental)
  • Revision ID: package-import@ubuntu.com-20130110183935-afsgfxkmg7wk5eaj
Tags: 2.17-0ubuntu1
* Merge with Debian, bringing in a new upstream and many small fixes:
  - patches/any/cvs-malloc-deadlock.diff: Dropped, merged upstream.
  - patches/ubuntu/lddebug-scopes.diff: Rebase for upstream changes.
  - patches/ubuntu/local-CVE-2012-3406.diff: Rebased against upstream.
  - patches/ubuntu/no-asm-mtune-i686.diff: Fixed in recent binutils.
* This upstream merge fixes a nasty hang in pulseaudio (LP: #1085342)
* Bump MIN_KERNEL_SUPPORTED to 2.6.32 on ARM, now that we no longer
  have to support shonky 2.6.31 kernels on imx51 babbage builders.
* Drop patches/ubuntu/local-disable-nscd-host-caching.diff, as these
  issues were apparently resolved upstream a while ago (LP: #613662)
* Fix the compiled-in bug URL to point to launchpad.net, not Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 1998-2006, 2007, 2009 Free Software Foundation, Inc.
 
1
/* Copyright (C) 1998-2012 Free Software Foundation, Inc.
2
2
   This file is part of the GNU C Library.
3
3
 
4
4
   The GNU C Library is free software; you can redistribute it and/or
46
46
#endif
47
47
 
48
48
 
 
49
#ifndef SHARED
 
50
# include <link.h>
 
51
# include <dl-irel.h>
 
52
 
 
53
# ifdef ELF_MACHINE_IRELA
 
54
#  define IREL_T        ElfW(Rela)
 
55
#  define IPLT_START    __rela_iplt_start
 
56
#  define IPLT_END      __rela_iplt_end
 
57
#  define IREL          elf_irela
 
58
# elif defined ELF_MACHINE_IREL
 
59
#  define IREL_T        ElfW(Rel)
 
60
#  define IPLT_START    __rel_iplt_start
 
61
#  define IPLT_END      __rel_iplt_end
 
62
#  define IREL          elf_irel
 
63
# endif
 
64
 
 
65
static void
 
66
apply_irel (void)
 
67
{
 
68
# ifdef IREL
 
69
  /* We use weak references for these so that we'll still work with a linker
 
70
     that doesn't define them.  Such a linker doesn't support IFUNC at all
 
71
     and so uses won't work, but a statically-linked program that doesn't
 
72
     use any IFUNC symbols won't have a problem.  */
 
73
  extern const IREL_T IPLT_START[] __attribute__ ((weak));
 
74
  extern const IREL_T IPLT_END[] __attribute__ ((weak));
 
75
  for (const IREL_T *ipltent = IPLT_START; ipltent < IPLT_END; ++ipltent)
 
76
    IREL (ipltent);
 
77
# endif
 
78
}
 
79
#endif
 
80
 
 
81
 
49
82
#ifdef LIBC_START_MAIN
50
83
# ifdef LIBC_START_DISABLE_INLINE
51
84
#  define STATIC static
136
169
    }
137
170
# endif
138
171
 
139
 
  /* Performe IREL{,A} relocations.  */
140
 
  __libc_csu_irel ();
 
172
  /* Perform IREL{,A} relocations.  */
 
173
  apply_irel ();
141
174
 
142
175
#ifndef __GNU__
143
176
  /* Initialize the thread library at least a bit since the libgcc
241
274
      result = 0;
242
275
# ifdef SHARED
243
276
      unsigned int *ptr = __libc_pthread_functions.ptr_nthreads;
 
277
#  ifdef PTR_DEMANGLE
244
278
      PTR_DEMANGLE (ptr);
 
279
#  endif
245
280
# else
246
281
      extern unsigned int __nptl_nthreads __attribute ((weak));
247
282
      unsigned int *const ptr = &__nptl_nthreads;