* elf32-ppc.c (LWZU_0_X_11): Delete.
[binutils.git] / gas / config / tc-mn10300.h
blobfc650256b3898ff77035019de95aaa5224e1f03c
1 /* tc-mn10300.h -- Header file for tc-mn10300.c.
2 Copyright 1996, 1997, 2000, 2001, 2002, 2003, 2004
3 Free Software Foundation, Inc.
5 This file is part of GAS, the GNU Assembler.
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.
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.
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, 51 Franklin Street - Fifth Floor, Boston, MA
20 02110-1301, USA. */
22 #define TC_MN10300
24 #define TARGET_BYTES_BIG_ENDIAN 0
26 #ifndef BFD_ASSEMBLER
27 #error MN10300 support requires BFD_ASSEMBLER
28 #endif
30 #define DIFF_EXPR_OK
31 #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
33 #define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
34 ((FIX)->fx_r_type != BFD_RELOC_32_PLT_PCREL \
35 && (FIX)->fx_r_type != BFD_RELOC_MN10300_GOT32 \
36 && (FIX)->fx_r_type != BFD_RELOC_32_GOT_PCREL \
37 && ((FIX)->fx_addsy == NULL \
38 || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
39 && ! S_IS_WEAK ((FIX)->fx_addsy) \
40 && S_IS_DEFINED ((FIX)->fx_addsy) \
41 && ! S_IS_COMMON ((FIX)->fx_addsy))))
43 #define md_parse_name(name, exprP, nextcharP) \
44 mn10300_parse_name ((name), (exprP), (nextcharP))
45 int mn10300_parse_name PARAMS ((char const *, expressionS *, char *));
47 #define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP) \
48 mn10300_cons_fix_new ((FRAG), (OFF), (LEN), (EXP))
49 void mn10300_cons_fix_new PARAMS ((fragS *, int, int, expressionS *));
51 /* This is used to construct expressions out of @GOTOFF, @PLT and @GOT
52 symbols. The relocation type is stored in X_md. */
53 #define O_PIC_reloc O_md1
55 /* The target BFD architecture. */
56 #define TARGET_ARCH bfd_arch_mn10300
58 #ifdef TE_LINUX
59 #define TARGET_FORMAT "elf32-am33lin"
60 #else
61 #define TARGET_FORMAT "elf32-mn10300"
62 #endif
65 /* Do not adjust relocations involving symbols in code sections,
66 because it breaks linker relaxations. This could be fixed in the
67 linker, but this fix is simpler, and it pretty much only affects
68 object size a little bit. */
69 #define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEC) \
70 (((SEC)->flags & SEC_CODE) != 0 \
71 || ! SEG_NORMAL (SEC) \
72 || TC_FORCE_RELOCATION (FIX))
74 /* We validate subtract arguments within tc_gen_reloc(), so don't
75 report errors at this point. */
76 #define TC_VALIDATE_FIX_SUB(FIX) 1
78 /* Fixup debug sections since we will never relax them. Ideally, we
79 could do away with this and instead check every single fixup with
80 TC_FORCE_RELOCATION and TC_FORCE_RELOCATION_SUB_NAME, verifying
81 that the sections of the referenced symbols (and not the sections
82 in which the fixup appears) may be subject to relaxation. We'd
83 still have to check the section in which the fixup appears, because
84 we want to do some simplifications in debugging info that might
85 break in real code.
87 Using the infrastructure in write.c to simplify subtraction fixups
88 would enable us to remove a lot of code from tc_gen_reloc(), but
89 this is simpler, faster, and produces almost the same effect.
90 Also, in the macros above, we can't check whether the fixup is in a
91 debugging section or not, so we have to use this for now. */
92 #define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC)
94 #define md_operand(x)
96 /* Permit temporary numeric labels. */
97 #define LOCAL_LABELS_FB 1
99 /* We don't need to handle .word strangely. */
100 #define WORKING_DOT_WORD
102 #define md_number_to_chars number_to_chars_littleendian
104 /* Don't bother to adjust relocs. */
105 /* #define tc_fix_adjustable(FIX) 0 */
106 #define tc_fix_adjustable(FIX) mn10300_fix_adjustable (FIX)
107 extern bfd_boolean mn10300_fix_adjustable PARAMS ((struct fix *));
109 /* We do relaxing in the assembler as well as the linker. */
110 extern const struct relax_type md_relax_table[];
111 #define TC_GENERIC_RELAX_TABLE md_relax_table
113 #define DWARF2_LINE_MIN_INSN_LENGTH 1