diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-07-14 17:02:11 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-07-14 17:02:11 +0000 |
commit | 24edc24dbe07ea0c08288b37682103a4751e47d0 (patch) | |
tree | c145b86b43fdb2e23cdb13580b95ef5310f42f76 /ld/testsuite/ld-elf/init.c | |
parent | 6c5cf62cc910b5f946c67f987f21e150de88666a (diff) | |
download | gdb-24edc24dbe07ea0c08288b37682103a4751e47d0.zip gdb-24edc24dbe07ea0c08288b37682103a4751e47d0.tar.gz gdb-24edc24dbe07ea0c08288b37682103a4751e47d0.tar.bz2 |
2005-07-14 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/elf.exp (array_tests): New.
Call run_ld_link_exec_tests with array_tests.
* ld-elf/fini.c: New file.
* ld-elf/fini.out: Likewise.
* ld-elf/init.c: Likewise.
* ld-elf/init.out: Likewise.
* ld-elf/preinit.c: Likewise.
* ld-elf/preinit.out: Likewise.
* lib/ld-lib.exp (run_ld_link_exec_tests): New.
Diffstat (limited to 'ld/testsuite/ld-elf/init.c')
-rw-r--r-- | ld/testsuite/ld-elf/init.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/init.c b/ld/testsuite/ld-elf/init.c new file mode 100644 index 0000000..3b1ffb1 --- /dev/null +++ b/ld/testsuite/ld-elf/init.c @@ -0,0 +1,34 @@ +#include <stdio.h> + +static void +init_0 (void) +{ + printf ("init array 0\n"); +} + +static void +init_1 (void) +{ + printf ("init array 1\n"); +} + +static void +init_2 (void) +{ + printf ("init array 2\n"); +} + +void (*const init_array []) (void) + __attribute__ ((section (".init_array"), + aligned (sizeof (void *)))) = +{ + &init_0, + &init_1, + &init_2 +}; + +int +main (void) +{ + return 0; +} |