]>
Commit | Line | Data |
---|---|---|
252b5132 | 1 | /* tc-mn10300.h -- Header file for tc-mn10300.c. |
ae6063d4 AM |
2 | Copyright 1996, 1997, 2000, 2001, 2002, 2003 |
3 | 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 | |
9 | the Free Software Foundation; either version 2, or (at your option) | |
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 | |
18 | along with GAS; see the file COPYING. If not, write to the Free | |
19 | Software Foundation, 59 Temple Place - Suite 330, Boston, MA | |
82efde3a | 20 | 02111-1307, USA. */ |
252b5132 RH |
21 | |
22 | #define TC_MN10300 | |
23 | ||
24 | #define TARGET_BYTES_BIG_ENDIAN 0 | |
25 | ||
26 | #ifndef BFD_ASSEMBLER | |
27 | #error MN10300 support requires BFD_ASSEMBLER | |
28 | #endif | |
29 | ||
30 | /* The target BFD architecture. */ | |
31 | #define TARGET_ARCH bfd_arch_mn10300 | |
32 | ||
33 | #define TARGET_FORMAT "elf32-mn10300" | |
34 | ||
a161fe53 AM |
35 | /* No shared lib support, so we don't need to ensure externally |
36 | visible symbols can be overridden. */ | |
37 | #define EXTERN_FORCE_RELOC 0 | |
38 | ||
a161fe53 AM |
39 | /* Do not adjust relocations involving symbols in code sections, |
40 | because it breaks linker relaxations. This could be fixed in the | |
41 | linker, but this fix is simpler, and it pretty much only affects | |
42 | object size a little bit. */ | |
ae6063d4 AM |
43 | #define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEC) \ |
44 | (((SEC)->flags & SEC_CODE) != 0 \ | |
45 | || ! SEG_NORMAL (SEC) \ | |
46 | || TC_FORCE_RELOCATION (FIX)) | |
58a77e41 | 47 | |
074d08b0 AO |
48 | /* We validate subtract arguments within tc_gen_reloc(), so don't |
49 | report errors at this point. */ | |
50 | #define TC_VALIDATE_FIX_SUB(FIX) 1 | |
51 | ||
52 | /* Fixup debug sections since we will never relax them. Ideally, we | |
53 | could do away with this and instead check every single fixup with | |
54 | TC_FORCE_RELOCATION and TC_FORCE_RELOCATION_SUB_NAME, verifying | |
55 | that the sections of the referenced symbols (and not the sections | |
56 | in which the fixup appears) may be subject to relaxation. We'd | |
57 | still have to check the section in which the fixup appears, because | |
58 | we want to do some simplifications in debugging info that might | |
59 | break in real code. | |
60 | ||
61 | Using the infrastructure in write.c to simplify subtraction fixups | |
62 | would enable us to remove a lot of code from tc_gen_reloc(), but | |
63 | this is simpler, faster, and produces almost the same effect. | |
64 | Also, in the macros above, we can't check whether the fixup is in a | |
65 | debugging section or not, so we have to use this for now. */ | |
58a77e41 EC |
66 | #define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC) |
67 | ||
252b5132 RH |
68 | #define md_operand(x) |
69 | ||
70 | /* Permit temporary numeric labels. */ | |
71 | #define LOCAL_LABELS_FB 1 | |
72 | ||
73 | /* We don't need to handle .word strangely. */ | |
74 | #define WORKING_DOT_WORD | |
75 | ||
76 | #define md_number_to_chars number_to_chars_littleendian | |
77 | ||
78 | /* Don't bother to adjust relocs. */ | |
79 | #define tc_fix_adjustable(FIX) 0 | |
a161fe53 | 80 | /* #define tc_fix_adjustable(FIX) mn10300_fix_adjustable (FIX) */ |
b34976b6 | 81 | extern bfd_boolean mn10300_fix_adjustable PARAMS ((struct fix *)); |
252b5132 RH |
82 | |
83 | /* We do relaxing in the assembler as well as the linker. */ | |
84 | extern const struct relax_type md_relax_table[]; | |
85 | #define TC_GENERIC_RELAX_TABLE md_relax_table | |
e8b1cae5 | 86 | |
c0bd0db2 | 87 | #define DWARF2_LINE_MIN_INSN_LENGTH 1 |