2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
10 __attribute__((constructor))
11 static void init_func(void) {
12 printf("init_func with default priority\n");
15 __attribute__((constructor(200)))
16 static void init_func200(void) {
17 printf("init_func with priority 200\n");
20 __attribute__((constructor(300)))
21 static void init_func300(void) {
22 printf("init_func with priority 300\n");
25 __attribute__((destructor))
26 static void fini_func(void) {
27 printf("fini_func with default priority\n");
30 __attribute__((destructor(200)))
31 static void fini_func200(void) {
32 printf("fini_func with priority 200\n");
35 __attribute__((destructor(300)))
36 static void fini_func300(void) {
37 printf("fini_func with priority 300\n");
41 printf("in main()\n");