From 26a676d0aae53e2e770581c133356d8c0e39268c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jan 2003 07:52:53 +0000 Subject: [PATCH] Test modules for DF_1_NODELETE test. --- elf/nodel2mod1.c | 19 +++++++++++++++++++ elf/nodel2mod2.c | 7 +++++++ elf/nodel2mod3.c | 1 + 3 files changed, 27 insertions(+) create mode 100644 elf/nodel2mod1.c create mode 100644 elf/nodel2mod2.c create mode 100644 elf/nodel2mod3.c diff --git a/elf/nodel2mod1.c b/elf/nodel2mod1.c new file mode 100644 index 0000000000..acddc4cf8b --- /dev/null +++ b/elf/nodel2mod1.c @@ -0,0 +1,19 @@ +#include +void +foo (void) +{ + exit (0); +} + +void +__attribute__((destructor)) +bar (void) +{ + static int i; + foo (); + ++i; +} +void +baz (void) +{ +} diff --git a/elf/nodel2mod2.c b/elf/nodel2mod2.c new file mode 100644 index 0000000000..d0020240a8 --- /dev/null +++ b/elf/nodel2mod2.c @@ -0,0 +1,7 @@ +void +__attribute__((constructor)) +xxx (void) +{ + extern void baz (void); + baz (); +} diff --git a/elf/nodel2mod3.c b/elf/nodel2mod3.c new file mode 100644 index 0000000000..6d1a0d47b7 --- /dev/null +++ b/elf/nodel2mod3.c @@ -0,0 +1 @@ +int x;