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