#include <stdio.h>

#define SECTION( S ) __attribute__ ((section ( S )))

#pragma GCC diagnostic ignored "-Wunused-variable"

static void init1static(void) {
  printf ("init1static\n");
}

static void init1static_caller(void) {
  __asm__(".section .init");
  init1static();
  __asm__(".section .text\n");
}


static void ctor1static(void) {
   printf("ctor1static -- SHOULDN'T BE CALLED!\n");
}
static void (*ctor1static_ptr)(void) SECTION(".ctors") =ctor1static; // won't be called.

static void ctor1extern(void) {
   printf("ctor1extern\n");
}
/*extern*/ void (*ctor1extern_ptr)(void) SECTION(".ctors") =ctor1extern;

__attribute__((constructor (111)))
static void constructor1static111(void) {
  printf("constructor1static111\n");
}

__attribute__((constructor (131)))
static void constructor1static131(void) {
  printf("constructor1static131\n");
}

__attribute__((constructor (121)))
extern void constructor1extern121(void) {
  printf("constructor1extern121\n");
}

extern void constructor1(void) {
  printf("constructor1\n");
}

extern void constructor1_init(void) {
  printf("constructor1_init\n");
}
