Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | /* This file is tc-mcore.h |
2 | ||
2571583a | 3 | Copyright (C) 1999-2017 Free Software Foundation, Inc. |
252b5132 RH |
4 | |
5 | This file is part of GAS, the GNU Assembler. | |
6 | ||
7 | GAS is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
ec2655a6 | 9 | the Free Software Foundation; either version 3, or (at your option) |
252b5132 RH |
10 | any later version. |
11 | ||
12 | GAS is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
bec50466 | 18 | along with GAS; see the file COPYING. If not, write to the |
4b4da160 NC |
19 | Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA |
20 | 02110-1301, USA. */ | |
252b5132 RH |
21 | |
22 | #ifndef TC_MCORE | |
23 | #define TC_MCORE 1 | |
24 | ||
252b5132 | 25 | #define TARGET_ARCH bfd_arch_mcore |
829ce307 NC |
26 | /* Used to initialise target_big_endian. */ |
27 | #define TARGET_BYTES_BIG_ENDIAN 0 | |
252b5132 | 28 | |
252b5132 RH |
29 | #define IGNORE_NONSTANDARD_ESCAPES |
30 | ||
252b5132 RH |
31 | /* Some pseudo-op semantic extensions. */ |
32 | #define PSEUDO_LCOMM_OPTIONAL_ALIGN | |
33 | ||
ec2655a6 | 34 | #define LISTING_HEADER "M.CORE GAS" |
252b5132 RH |
35 | #define LISTING_LHS_CONT_LINES 4 |
36 | ||
252b5132 RH |
37 | /* We want local label support. */ |
38 | #define LOCAL_LABELS_FB 1 | |
a75214e5 | 39 | |
252b5132 RH |
40 | extern const struct relax_type md_relax_table[]; |
41 | #define TC_GENERIC_RELAX_TABLE md_relax_table | |
42 | #define md_end md_mcore_end | |
43 | ||
a75214e5 | 44 | /* Want the section information too... */ |
a161fe53 | 45 | #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC) |
252b5132 | 46 | |
252b5132 RH |
47 | #ifdef OBJ_COFF |
48 | ||
49 | #define TARGET_FORMAT (target_big_endian ? "pe-mcore-big" : "pe-mcore-little") | |
50 | ||
49309057 ILT |
51 | struct mcore_tc_sy |
52 | { | |
53 | int sy_flags; | |
54 | }; | |
55 | ||
56 | #define TC_SYMFIELD_TYPE struct mcore_tc_sy | |
252b5132 | 57 | |
f11900d0 | 58 | # if defined TE_PE |
a161fe53 | 59 | # define TC_FORCE_RELOCATION(x) \ |
ae6063d4 | 60 | ((x)->fx_r_type == BFD_RELOC_RVA || generic_force_reloc (x)) |
f11900d0 NC |
61 | # endif |
62 | ||
252b5132 RH |
63 | #endif /* OBJ_COFF */ |
64 | ||
252b5132 RH |
65 | #ifdef OBJ_ELF |
66 | ||
67 | #define TARGET_FORMAT (target_big_endian ? "elf32-mcore-big" : "elf32-mcore-little") | |
68 | ||
a161fe53 AM |
69 | /* No shared lib support, so we don't need to ensure externally |
70 | visible symbols can be overridden. */ | |
71 | #define EXTERN_FORCE_RELOC 0 | |
72 | ||
252b5132 RH |
73 | /* When relaxing, we need to emit various relocs we otherwise wouldn't. */ |
74 | #define TC_FORCE_RELOCATION(fix) mcore_force_relocation (fix) | |
252b5132 | 75 | |
a161fe53 | 76 | #define tc_fix_adjustable(FIX) mcore_fix_adjustable (FIX) |
252b5132 | 77 | |
55cf6793 | 78 | /* Values passed to md_apply_fix don't include the symbol value. */ |
a161fe53 AM |
79 | #define MD_APPLY_SYM_VALUE(FIX) 0 |
80 | ||
252b5132 RH |
81 | #endif /* OBJ_ELF */ |
82 | ||
83 | #ifndef TARGET_FORMAT | |
84 | # error No target format specified. | |
85 | #endif | |
86 | ||
252b5132 | 87 | #include "write.h" /* For definition of fixS */ |
a75214e5 | 88 | |
ea1562b3 NC |
89 | extern void md_mcore_end (void); |
90 | extern long md_pcrel_from_section (fixS *, segT); | |
91 | extern arelent * tc_gen_reloc (asection *, fixS *); | |
92 | extern int mcore_force_relocation (fixS *); | |
93 | extern bfd_boolean mcore_fix_adjustable (fixS *); | |
252b5132 RH |
94 | |
95 | #endif /* TC_MCORE */ |