glibc/glibc-2.14-fix-ctors.patch
Sascha Peilicke 6332039008 Accepting request 85188 from Base:System
- Update to 2.14 git version 8bd683657e8a, it contains backports from
  glibc trunk:
  + Avoid race between {,__de}allocate_stack and __reclaim_stacks
    during fork
- Add glibc-2.14-fix-ctors.patch to run ctors (bnc#717671), gcc 4.6
  optimized these away.

- don't use -fasynchronous-unwind-tables on arm, it breaks the build

- Cleanup spec file: remove some tags

OBS-URL: https://build.opensuse.org/request/show/85188
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=86
2011-09-28 12:09:53 +00:00

31 lines
729 B
Diff

Index: glibc-2.14/elf/soinit.c
===================================================================
--- glibc-2.14.orig/elf/soinit.c
+++ glibc-2.14/elf/soinit.c
@@ -26,7 +26,11 @@ void
__libc_global_ctors (void)
{
/* Call constructor functions. */
- run_hooks (__CTOR_LIST__);
+ void (**tem)();
+ asm ("" : "=r" (tem) : "0" (__CTOR_LIST__));
+ /* Call destructor functions. */
+
+ run_hooks (tem);
}
@@ -36,7 +40,11 @@ void
__libc_fini (void)
{
/* Call destructor functions. */
- run_hooks (__DTOR_LIST__);
+ void (**tem)();
+ asm ("" : "=r" (tem) : "0" (__DTOR_LIST__));
+ /* Call destructor functions. */
+
+ run_hooks (tem);
}
void (*_fini_ptr) (void) __attribute__ ((section (".fini_array")))