This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch hjl/init created. glibc-2.16-ports-merge-680-g224cb13


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/init has been created
        at  224cb1349151189a864e6b64be01966da1164374 (commit)

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=224cb1349151189a864e6b64be01966da1164374

commit 224cb1349151189a864e6b64be01966da1164374
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Nov 16 06:49:38 2012 -0800

    Set constructor/destructor priority to 1000

diff --git a/ChangeLog.hjl b/ChangeLog.hjl
new file mode 100644
index 0000000..f7a55a3
--- /dev/null
+++ b/ChangeLog.hjl
@@ -0,0 +1,5 @@
+2012-11-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf/tst-array1.c (init): Set constructor priority to 1000.
+	(fini): Set destructor priority to 1000.
+	* elf/tst-array2dep.c: Likewise.
diff --git a/elf/tst-array1.c b/elf/tst-array1.c
index ca9bdf4..e998932 100644
--- a/elf/tst-array1.c
+++ b/elf/tst-array1.c
@@ -1,6 +1,7 @@
 #include <unistd.h>
 
-static void init (void) __attribute__ ((constructor));
+/* Give init non-default priority so that it runs before init_array.  */
+static void init (void) __attribute__ ((constructor (1000)));
 
 static void
 init (void)
@@ -8,7 +9,8 @@ init (void)
   write (STDOUT_FILENO, "init\n", 5);
 }
 
-static void fini (void) __attribute__ ((destructor));
+/* Give fini the same priority as init.  */
+static void fini (void) __attribute__ ((destructor (1000)));
 
 static void
 fini (void)
diff --git a/elf/tst-array2dep.c b/elf/tst-array2dep.c
index 2812761..2f920cd 100644
--- a/elf/tst-array2dep.c
+++ b/elf/tst-array2dep.c
@@ -1,6 +1,7 @@
 #include <unistd.h>
 
-static void init (void) __attribute__ ((constructor));
+/* Give init non-default priority so that it runs before init_array.  */
+static void init (void) __attribute__ ((constructor (1000)));
 
 static void
 init (void)
@@ -8,7 +9,8 @@ init (void)
   write (STDOUT_FILENO, "DSO init\n", 9);
 }
 
-static void fini (void) __attribute__ ((destructor));
+/* Give fini the same priority as init.  */
+static void fini (void) __attribute__ ((destructor (1000)));
 
 static void
 fini (void)

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]