1 /* Specialized bits of code needed for the OpenMP offloading tables.
2 Copyright (C) 2014 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 <http://www.gnu.org/licenses/>. */
25 /* Target machine header files require this define. */
28 /* FIXME: Including auto-host is incorrect, but until we have
29 identified the set of defines that need to go into auto-target.h,
30 this will have to do. */
31 #include "auto-host.h"
38 #include "coretypes.h"
40 #include "libgcc_tm.h"
44 #if defined(HAVE_GAS_HIDDEN) && defined(ENABLE_OFFLOADING)
45 void *_omp_func_table
[0]
46 __attribute__ ((__used__
, visibility ("hidden"),
47 section ("__gnu_offload_funcs"))) = { };
48 void *_omp_var_table
[0]
49 __attribute__ ((__used__
, visibility ("hidden"),
50 section ("__gnu_offload_vars"))) = { };
55 #if defined(HAVE_GAS_HIDDEN) && defined(ENABLE_OFFLOADING)
56 void *_omp_funcs_end
[0]
57 __attribute__ ((__used__
, visibility ("hidden"),
58 section ("__gnu_offload_funcs"))) = { };
59 void *_omp_vars_end
[0]
60 __attribute__ ((__used__
, visibility ("hidden"),
61 section ("__gnu_offload_vars"))) = { };
62 extern void *_omp_func_table
[];
63 extern void *_omp_var_table
[];
64 void *__OPENMP_TARGET__
[] __attribute__ ((__visibility__ ("hidden"))) =
66 &_omp_func_table
, &_omp_funcs_end
,
67 &_omp_var_table
, &_omp_vars_end
71 #else /* ! CRT_BEGIN && ! CRT_END */
72 #error "One of CRT_BEGIN or CRT_END must be defined."