]>
Commit | Line | Data |
---|---|---|
779bdadb ST |
1 | /* keep_text_section_prefix.cc -- a test case for gold |
2 | ||
b3adc24a | 3 | Copyright (C) 2018-2020 Free Software Foundation, Inc. |
779bdadb ST |
4 | Written by Sriraman Tallam <[email protected]> |
5 | ||
6 | This file is part of gold. | |
7 | ||
8 | This program is free software; you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation; either version 3 of the License, or | |
11 | (at your option) any later version. | |
12 | ||
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
19 | along with this program; if not, write to the Free Software | |
20 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
21 | MA 02110-1301, USA. */ | |
22 | ||
23 | extern "C" { | |
24 | __attribute__((section(".text.unlikely.foo"))) | |
25 | int unlikely_foo(void) { | |
26 | return 0; | |
27 | } | |
28 | ||
29 | __attribute__((section(".text.hot.foo"))) | |
30 | int hot_foo(void) { | |
31 | return 0; | |
32 | } | |
33 | ||
34 | __attribute__((section(".text.startup.foo"))) | |
35 | int startup_foo(void) { | |
36 | return 0; | |
37 | } | |
38 | ||
39 | __attribute__((section(".text.exit.foo"))) | |
40 | int exit_foo(void) { | |
41 | return 0; | |
42 | } | |
43 | ||
44 | __attribute__((section(".text.foo"))) | |
45 | int regular_foo(void) { | |
46 | return 0; | |
47 | } | |
48 | ||
49 | int main(void) { | |
50 | return 0; | |
51 | } | |
52 | } |