]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/pa/elf.h
Update Copyright years for files modified in 2011 and/or 2012.
[thirdparty/gcc.git] / gcc / config / pa / elf.h
CommitLineData
cd23503e 1/* Definitions for ELF assembler support.
71e45bc2 2 Copyright (C) 1999, 2003, 2005, 2007, 2011 Free Software Foundation, Inc.
cd23503e 3
5c1d8983 4This file is part of GCC.
cd23503e 5
5c1d8983 6GCC is free software; you can redistribute it and/or modify
cd23503e 7it under the terms of the GNU General Public License as published by
038d1e19 8the Free Software Foundation; either version 3, or (at your option)
cd23503e 9any later version.
10
5c1d8983 11GCC is distributed in the hope that it will be useful,
cd23503e 12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
038d1e19 17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
cd23503e 19
20/* So we can conditionalize small amounts of code in pa.c or pa.md. */
21#define OBJ_ELF
22
e4077beb 23#define ENDFILE_SPEC "crtend.o%s"
24
25#define STARTFILE_SPEC "%{!shared: \
26 %{!symbolic: \
27 %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
28 crtbegin.o%s"
29
cd23503e 30#define TEXT_SECTION_ASM_OP "\t.text"
31#define DATA_SECTION_ASM_OP "\t.data"
9e6d557a 32#define BSS_SECTION_ASM_OP "\t.section\t.bss"
cd23503e 33
92c473b8 34#define TARGET_ASM_FILE_START pa_elf_file_start
3a5f89ea 35
b810486a 36#undef ASM_DECLARE_FUNCTION_NAME
3a5f89ea 37#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
38do { \
39 if (TREE_PUBLIC (DECL)) \
40 { \
41 fputs ("\t.EXPORT ", FILE); \
42 assemble_name (FILE, NAME); \
43 fputs (",ENTRY\n", FILE); \
44 } \
45 } while (0)
46
02604695 47/* This is how to output a command to make the user-level label
48 named NAME defined for reference from other files. We use
49 assemble_name_raw instead of assemble_name since a symbol in
50 a .IMPORT directive that isn't otherwise referenced is not
51 placed in the symbol table of the assembled object.
52
53 Failure to import a function reference can cause the HP linker
54 to segmentation fault!
55
56 Note that the SOM based tools need the symbol imported as a
57 CODE symbol, while the ELF based tools require the symbol to
58 be imported as an ENTRY symbol. */
59
60#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
5f43b4f6 61 pa_hpux_asm_output_external ((FILE), (DECL), (NAME))
62#define ASM_OUTPUT_EXTERNAL_REAL(FILE, DECL, NAME) \
02604695 63 do { fputs ("\t.IMPORT ", FILE); \
64 assemble_name_raw (FILE, NAME); \
65 if (FUNCTION_NAME_P (NAME)) \
66 fputs (",ENTRY\n", FILE); \
67 else \
68 fputs (",DATA\n", FILE); \
3a5f89ea 69 } while (0)
70
71/* The bogus HP assembler requires ALL external references to be
72 "imported", even library calls. They look a bit different, so
73 here's this macro.
74
7811991d 75 Also note not all libcall names are passed to
76 targetm.encode_section_info (__main for example). To make sure all
77 libcall names have section info recorded in them, we do it here. */
3a5f89ea 78
b810486a 79#undef ASM_OUTPUT_EXTERNAL_LIBCALL
3a5f89ea 80#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, RTL) \
81 do { fputs ("\t.IMPORT ", FILE); \
82 if (!function_label_operand (RTL, VOIDmode)) \
e202682d 83 pa_encode_label (RTL); \
3a5f89ea 84 assemble_name (FILE, XSTR ((RTL), 0)); \
85 fputs (",ENTRY\n", FILE); \
86 } while (0)
87
763fb6cb 88/* Biggest alignment supported by the object file format of this
89 machine. Use this macro to limit the alignment which can be
90 specified using the `__attribute__ ((aligned (N)))' construct. If
91 not defined, the default value is `BIGGEST_ALIGNMENT'. */
92#define MAX_OFILE_ALIGNMENT (32768 * 8)