1 /* initpri1.c -- test constructor priorities.
3 Copyright 2007, 2008 Free Software Foundation, Inc.
4 Copied from the gcc testsuite, where the test was contributed by
5 Mark Mitchell <mark@codesourcery.com>.
7 This file is part of gold.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
24 This is a test of a common symbol in the main program and a
25 versioned symbol in a shared library. The common symbol in the
26 main program should override the shared library symbol. */
33 void c1(void) __attribute__((constructor (500)));
34 void c2(void) __attribute__((constructor (700)));
35 void c3(void) __attribute__((constructor (600)));
52 void d1(void) __attribute__((destructor (500)));
53 void d2(void) __attribute__((destructor (700)));
54 void d3(void) __attribute__((destructor (600)));
73 void cd4(void) __attribute__((constructor (800), destructor (800)));
81 void cd5(void) __attribute__((constructor
, destructor
));