1 /* initpri2.c -- test mixing init_array and ctor priorities.
3 Copyright 2011 Free Software Foundation, Inc.
4 Copied from the gcc configury, where the test was contributed by
5 H.J. Lu <hongjiu.lu@intel.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,
22 MA 02110-1301, USA. */
24 /* This tests that the linker correctly combines .ctor and .init_array
25 sections when both have priorities. */
38 void (*const init_array1005
[]) (void)
39 __attribute__ ((section (".init_array.01005"), aligned (sizeof (void *))))
47 void (*const fini_array1005
[]) (void)
48 __attribute__ ((section (".fini_array.01005"), aligned (sizeof (void *))))
58 void (*const ctors1007
[]) (void)
59 __attribute__ ((section (".ctors.64528"), aligned (sizeof (void *))))
68 void (*const dtors1007
[]) (void)
69 __attribute__ ((section (".dtors.64528"), aligned (sizeof (void *))))
79 void (*const init_array65530
[]) (void)
80 __attribute__ ((section (".init_array.65530"), aligned (sizeof (void *))))
89 void (*const fini_array65530
[]) (void)
90 __attribute__ ((section (".fini_array.65530"), aligned (sizeof (void *))))
100 void (*const ctors65535
[]) (void)
101 __attribute__ ((section (".ctors"), aligned (sizeof (void *))))
110 void (*const dtors65535
[]) (void)
111 __attribute__ ((section (".dtors"), aligned (sizeof (void *))))
This page took 0.031766 seconds and 4 git commands to generate.