diff options
author | Andreas Schwab <schwab@redhat.com> | 2011-08-22 16:08:16 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-08-22 16:08:16 -0400 |
commit | e888bcbe4fb8ad538ec640bfb18b687d51e001e7 (patch) | |
tree | 95d9ee2186182388c15bd6245d4b1cf702ec34c2 /elf/tst-initorder2.c | |
parent | 91b392a4bab0c2dc90e7e3ff914dec20b97adca8 (diff) | |
download | glibc-e888bcbe4fb8ad538ec640bfb18b687d51e001e7.tar.gz glibc-e888bcbe4fb8ad538ec640bfb18b687d51e001e7.tar.xz glibc-e888bcbe4fb8ad538ec640bfb18b687d51e001e7.zip |
Correct cycle detection during dependency sorting
Diffstat (limited to 'elf/tst-initorder2.c')
-rw-r--r-- | elf/tst-initorder2.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/elf/tst-initorder2.c b/elf/tst-initorder2.c new file mode 100644 index 0000000000..050f9568b8 --- /dev/null +++ b/elf/tst-initorder2.c @@ -0,0 +1,20 @@ +#include <stdio.h> + +#ifndef NAME +int +main (void) +{ + puts ("main"); +} +#else +static void __attribute__ ((constructor)) +init (void) +{ + puts ("init: " NAME); +} +static void __attribute__ ((destructor)) +fini (void) +{ + puts ("fini: " NAME); +} +#endif |