Back to index

cell-binutils  2.17cvs20070401
tc-mn10300.h
Go to the documentation of this file.
00001 /* tc-mn10300.h -- Header file for tc-mn10300.c.
00002    Copyright 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2007
00003    Free Software Foundation, Inc.
00004 
00005    This file is part of GAS, the GNU Assembler.
00006 
00007    GAS is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2, or (at your option)
00010    any later version.
00011 
00012    GAS is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with GAS; see the file COPYING.  If not, write to the Free
00019    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00020    02110-1301, USA.  */
00021 
00022 #define TC_MN10300
00023 
00024 #define TARGET_BYTES_BIG_ENDIAN 0
00025 
00026 #define DIFF_EXPR_OK
00027 #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
00028 
00029 #define TC_FORCE_RELOCATION(FIX)                 \
00030   (generic_force_reloc (FIX))
00031 
00032 #define TC_FORCE_RELOCATION_LOCAL(FIX)                  \
00033   (!(FIX)->fx_pcrel                              \
00034    || (FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \
00035    || (FIX)->fx_r_type == BFD_RELOC_MN10300_GOT32       \
00036    || (FIX)->fx_r_type == BFD_RELOC_32_GOT_PCREL \
00037    || TC_FORCE_RELOCATION (FIX))
00038 
00039 #define md_parse_name(name, exprP, mode, nextcharP) \
00040     mn10300_parse_name ((name), (exprP), (mode), (nextcharP))
00041 int mn10300_parse_name PARAMS ((char const *, expressionS *,
00042                             enum expr_mode, char *));
00043 
00044 #define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP) \
00045      mn10300_cons_fix_new ((FRAG), (OFF), (LEN), (EXP))
00046 void mn10300_cons_fix_new PARAMS ((fragS *, int, int, expressionS *));
00047 
00048 /* This is used to construct expressions out of @GOTOFF, @PLT and @GOT
00049    symbols.  The relocation type is stored in X_md.  */
00050 #define O_PIC_reloc O_md1
00051 
00052 /* The target BFD architecture.  */
00053 #define TARGET_ARCH bfd_arch_mn10300
00054 
00055 #ifdef TE_LINUX
00056 #define TARGET_FORMAT "elf32-am33lin"
00057 #else
00058 #define TARGET_FORMAT "elf32-mn10300"
00059 #endif
00060 
00061 
00062 /* Do not adjust relocations involving symbols in code sections,
00063    because it breaks linker relaxations.  This could be fixed in the
00064    linker, but this fix is simpler, and it pretty much only affects
00065    object size a little bit.  */
00066 #define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEC)   \
00067   (((SEC)->flags & SEC_CODE) != 0         \
00068    || ! SEG_NORMAL (SEC)                  \
00069    || TC_FORCE_RELOCATION (FIX))
00070 
00071 /* We validate subtract arguments within tc_gen_reloc(), so don't
00072    report errors at this point.  */
00073 #define TC_VALIDATE_FIX_SUB(FIX) 1
00074 
00075 /* Fixup debug sections since we will never relax them.  Ideally, we
00076    could do away with this and instead check every single fixup with
00077    TC_FORCE_RELOCATION and TC_FORCE_RELOCATION_SUB_NAME, verifying
00078    that the sections of the referenced symbols (and not the sections
00079    in which the fixup appears) may be subject to relaxation.  We'd
00080    still have to check the section in which the fixup appears, because
00081    we want to do some simplifications in debugging info that might
00082    break in real code.
00083 
00084    Using the infrastructure in write.c to simplify subtraction fixups
00085    would enable us to remove a lot of code from tc_gen_reloc(), but
00086    this is simpler, faster, and produces almost the same effect.
00087    Also, in the macros above, we can't check whether the fixup is in a
00088    debugging section or not, so we have to use this for now.  */
00089 #define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC)
00090 
00091 #define md_operand(x)
00092 
00093 /* Permit temporary numeric labels.  */
00094 #define LOCAL_LABELS_FB 1
00095 
00096 /* We don't need to handle .word strangely.  */
00097 #define WORKING_DOT_WORD
00098 
00099 #define md_number_to_chars number_to_chars_littleendian
00100 
00101 /* Don't bother to adjust relocs.  */
00102 /* #define tc_fix_adjustable(FIX) 0 */
00103 #define tc_fix_adjustable(FIX) mn10300_fix_adjustable (FIX)
00104 extern bfd_boolean mn10300_fix_adjustable PARAMS ((struct fix *));
00105 
00106 /* We do relaxing in the assembler as well as the linker.  */
00107 extern const struct relax_type md_relax_table[];
00108 #define TC_GENERIC_RELAX_TABLE md_relax_table
00109 
00110 #define DWARF2_LINE_MIN_INSN_LENGTH 1