diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-10-27 21:39:59 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-10-27 21:39:59 +0000 |
commit | 0b5cfa4e0b7c9dc2cd81635307613c86c0f5e200 (patch) | |
tree | d9bf37b1a193cb3a52c598349d33c61c00a6aeca /elf/tst-dlmopen1mod.c | |
parent | aa85b49673c934c0eeeec9e6e302f94fa1b165ab (diff) | |
download | glibc-0b5cfa4e0b7c9dc2cd81635307613c86c0f5e200.tar glibc-0b5cfa4e0b7c9dc2cd81635307613c86c0f5e200.tar.gz glibc-0b5cfa4e0b7c9dc2cd81635307613c86c0f5e200.tar.bz2 glibc-0b5cfa4e0b7c9dc2cd81635307613c86c0f5e200.zip |
2.3.3-74cvs/fedora-glibc-2_3_3-74
Diffstat (limited to 'elf/tst-dlmopen1mod.c')
-rw-r--r-- | elf/tst-dlmopen1mod.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/elf/tst-dlmopen1mod.c b/elf/tst-dlmopen1mod.c index 40a4c8fa44..142488098a 100644 --- a/elf/tst-dlmopen1mod.c +++ b/elf/tst-dlmopen1mod.c @@ -3,6 +3,16 @@ #include <gnu/lib-names.h> +static int cnt; + +static void +__attribute ((constructor)) +constr (void) +{ + ++cnt; +} + + int foo (Lmid_t ns2) { @@ -34,5 +44,16 @@ foo (Lmid_t ns2) return 1; } + if (cnt == 0) + { + puts ("constructor did not run"); + return 1; + } + else if (cnt != 1) + { + puts ("constructor did not run exactly once"); + return 1; + } + return 0; } |