annotate gcc/config/pa/pa-openbsd.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions for PA_RISC with ELF format
kono
parents:
diff changeset
2 Copyright (C) 1999-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
8 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
9 any later version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
14 GNU General Public License for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 #undef TARGET_OS_CPP_BUILTINS
kono
parents:
diff changeset
22 #define TARGET_OS_CPP_BUILTINS() \
kono
parents:
diff changeset
23 do \
kono
parents:
diff changeset
24 { \
kono
parents:
diff changeset
25 OPENBSD_OS_CPP_BUILTINS(); \
kono
parents:
diff changeset
26 builtin_assert ("machine=bigendian"); \
kono
parents:
diff changeset
27 } \
kono
parents:
diff changeset
28 while (0)
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 /* Our profiling scheme doesn't LP labels and counter words. */
kono
parents:
diff changeset
31 #define NO_DEFERRED_PROFILE_COUNTERS 1
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 #undef STRING_ASM_OP
kono
parents:
diff changeset
34 #define STRING_ASM_OP "\t.stringz\t"
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 #define TEXT_SECTION_ASM_OP "\t.text"
kono
parents:
diff changeset
37 #define DATA_SECTION_ASM_OP "\t.data"
kono
parents:
diff changeset
38 #define BSS_SECTION_ASM_OP "\t.section\t.bss"
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 /* We want local labels to start with period if made with asm_fprintf. */
kono
parents:
diff changeset
41 #undef LOCAL_LABEL_PREFIX
kono
parents:
diff changeset
42 #define LOCAL_LABEL_PREFIX "."
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 /* Define these to generate the Linux/ELF/SysV style of internal
kono
parents:
diff changeset
45 labels all the time - i.e. to be compatible with
kono
parents:
diff changeset
46 ASM_GENERATE_INTERNAL_LABEL in <elfos.h>. Compare these with the
kono
parents:
diff changeset
47 ones in pa.h and note the lack of dollar signs in these. FIXME:
kono
parents:
diff changeset
48 shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 #undef ASM_OUTPUT_ADDR_VEC_ELT
kono
parents:
diff changeset
51 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
kono
parents:
diff changeset
52 fprintf (FILE, "\t.word .L%d\n", VALUE)
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 #undef ASM_OUTPUT_ADDR_DIFF_ELT
kono
parents:
diff changeset
55 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
kono
parents:
diff changeset
56 fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL)
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 /* Use the default. */
kono
parents:
diff changeset
59 #undef ASM_OUTPUT_LABEL
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 /* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and
kono
parents:
diff changeset
62 does what we want (i.e. uses colons). It must be compatible with
kono
parents:
diff changeset
63 ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 /* Use the default. */
kono
parents:
diff changeset
66 #undef ASM_OUTPUT_INTERNAL_LABEL
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 /* Use the default. */
kono
parents:
diff changeset
69 #undef TARGET_ASM_GLOBALIZE_LABEL
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 /* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
kono
parents:
diff changeset
72 labels in a function declaration (since pa.c seems determined to do
kono
parents:
diff changeset
73 it differently) */
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 #undef ASM_DECLARE_FUNCTION_NAME
kono
parents:
diff changeset
76 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
kono
parents:
diff changeset
77 do \
kono
parents:
diff changeset
78 { \
kono
parents:
diff changeset
79 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
kono
parents:
diff changeset
80 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
kono
parents:
diff changeset
81 } \
kono
parents:
diff changeset
82 while (0)
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 /* As well as globalizing the label, we need to encode the label
kono
parents:
diff changeset
85 to ensure a plabel is generated in an indirect call. */
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
kono
parents:
diff changeset
88 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
kono
parents:
diff changeset
89 do \
kono
parents:
diff changeset
90 { \
kono
parents:
diff changeset
91 if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \
kono
parents:
diff changeset
92 pa_encode_label (FUN); \
kono
parents:
diff changeset
93 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
kono
parents:
diff changeset
94 } \
kono
parents:
diff changeset
95 while (0)
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 /* This says how to output an assembler line to define a global common symbol
kono
parents:
diff changeset
98 with size SIZE (in bytes) and alignment ALIGN (in bits). */
kono
parents:
diff changeset
99
kono
parents:
diff changeset
100 #undef ASM_OUTPUT_ALIGNED_COMMON
kono
parents:
diff changeset
101 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
kono
parents:
diff changeset
102 pa_asm_output_aligned_common (FILE, NAME, SIZE, ALIGN)
kono
parents:
diff changeset
103
kono
parents:
diff changeset
104 /* This says how to output an assembler line to define a local common symbol
kono
parents:
diff changeset
105 with size SIZE (in bytes) and alignment ALIGN (in bits). This macro
kono
parents:
diff changeset
106 controls how the assembler definitions of uninitialized static variables
kono
parents:
diff changeset
107 are output. */
kono
parents:
diff changeset
108
kono
parents:
diff changeset
109 #undef ASM_OUTPUT_ALIGNED_LOCAL
kono
parents:
diff changeset
110 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
kono
parents:
diff changeset
111 pa_asm_output_aligned_local (FILE, NAME, SIZE, ALIGN)
kono
parents:
diff changeset
112
kono
parents:
diff changeset
113 /* OpenBSD always uses gas. */
kono
parents:
diff changeset
114 #undef TARGET_GAS
kono
parents:
diff changeset
115 #define TARGET_GAS 1
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 /* Layout of source language data types. */
kono
parents:
diff changeset
118
kono
parents:
diff changeset
119 /* This must agree with <machine/_types.h> */
kono
parents:
diff changeset
120 #undef SIZE_TYPE
kono
parents:
diff changeset
121 #define SIZE_TYPE "long unsigned int"
kono
parents:
diff changeset
122
kono
parents:
diff changeset
123 #undef PTRDIFF_TYPE
kono
parents:
diff changeset
124 #define PTRDIFF_TYPE "long int"
kono
parents:
diff changeset
125
kono
parents:
diff changeset
126 #undef WCHAR_TYPE
kono
parents:
diff changeset
127 #define WCHAR_TYPE "int"
kono
parents:
diff changeset
128
kono
parents:
diff changeset
129 #undef WCHAR_TYPE_SIZE
kono
parents:
diff changeset
130 #define WCHAR_TYPE_SIZE 32
kono
parents:
diff changeset
131
kono
parents:
diff changeset
132 #undef WINT_TYPE
kono
parents:
diff changeset
133 #define WINT_TYPE "int"
kono
parents:
diff changeset
134
kono
parents:
diff changeset
135 #undef LINK_SPEC
kono
parents:
diff changeset
136 #define LINK_SPEC \
kono
parents:
diff changeset
137 "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \
kono
parents:
diff changeset
138 %{shared:-shared} %{R*} \
kono
parents:
diff changeset
139 %{static:-Bstatic} \
kono
parents:
diff changeset
140 %{!static:-Bdynamic} \
kono
parents:
diff changeset
141 %{assert*} \
kono
parents:
diff changeset
142 -dynamic-linker /usr/libexec/ld.so"
kono
parents:
diff changeset
143
kono
parents:
diff changeset
144 #undef STARTFILE_SPEC
kono
parents:
diff changeset
145 #define STARTFILE_SPEC "\
kono
parents:
diff changeset
146 %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
kono
parents:
diff changeset
147 crtbegin%O%s} %{shared:crtbeginS%O%s}"
kono
parents:
diff changeset
148
kono
parents:
diff changeset
149 #undef ENDFILE_SPEC
kono
parents:
diff changeset
150 #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
kono
parents:
diff changeset
151
kono
parents:
diff changeset
152 #define OBSD_HAS_CORRECT_SPECS
kono
parents:
diff changeset
153
kono
parents:
diff changeset
154 #define HAVE_ENABLE_EXECUTE_STACK