Back to index

cell-binutils  2.17cvs20070401
tc-mcore.h
Go to the documentation of this file.
00001 /* This file is tc-mcore.h
00002 
00003    Copyright 1999, 2000, 2001, 2002, 2003, 2005
00004    Free Software Foundation, Inc.
00005 
00006    This file is part of GAS, the GNU Assembler.
00007 
00008    GAS is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    GAS is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with GAS; see the file COPYING.  If not, write to the
00020    Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00021    02110-1301, USA.  */
00022 
00023 #ifndef       TC_MCORE
00024 #define TC_MCORE 1
00025 
00026 #define TARGET_ARCH  bfd_arch_mcore
00027 /* Used to initialise target_big_endian.  */
00028 #define TARGET_BYTES_BIG_ENDIAN 0
00029 
00030 #define IGNORE_NONSTANDARD_ESCAPES
00031 
00032 /* Some pseudo-op semantic extensions.  */
00033 #define       PSEUDO_LCOMM_OPTIONAL_ALIGN
00034 
00035 #define LISTING_HEADER             "M.CORE GAS Version 2.9.4"
00036 #define LISTING_LHS_CONT_LINES     4
00037 
00038 /* We want local label support.  */
00039 #define LOCAL_LABELS_FB 1
00040 
00041 extern const struct relax_type md_relax_table[];
00042 #define TC_GENERIC_RELAX_TABLE md_relax_table
00043 #define md_end       md_mcore_end
00044 
00045 /* Want the section information too...  */
00046 #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
00047 
00048 #ifdef  OBJ_COFF
00049 
00050 #define TARGET_FORMAT       (target_big_endian ? "pe-mcore-big" : "pe-mcore-little")
00051 
00052 struct mcore_tc_sy
00053 {
00054   int sy_flags;
00055 };
00056 
00057 #define TC_SYMFIELD_TYPE struct mcore_tc_sy
00058 
00059 # if defined TE_PE
00060 #  define TC_FORCE_RELOCATION(x) \
00061      ((x)->fx_r_type == BFD_RELOC_RVA || generic_force_reloc (x))
00062 # endif
00063 
00064 #endif /* OBJ_COFF */
00065 
00066 #ifdef OBJ_ELF
00067 
00068 #define TARGET_FORMAT (target_big_endian ? "elf32-mcore-big" : "elf32-mcore-little")
00069 
00070 /* No shared lib support, so we don't need to ensure externally
00071    visible symbols can be overridden.  */
00072 #define EXTERN_FORCE_RELOC 0
00073 
00074 /* When relaxing, we need to emit various relocs we otherwise wouldn't.  */
00075 #define TC_FORCE_RELOCATION(fix) mcore_force_relocation (fix)
00076 
00077 #define tc_fix_adjustable(FIX) mcore_fix_adjustable (FIX)
00078 
00079 /* Values passed to md_apply_fix don't include the symbol value.  */
00080 #define MD_APPLY_SYM_VALUE(FIX) 0
00081 
00082 #endif /* OBJ_ELF */
00083 
00084 #ifndef TARGET_FORMAT
00085 # error No target format specified.
00086 #endif
00087 
00088 #include "write.h"        /* For definition of fixS */
00089 
00090 extern void        md_mcore_end           (void);
00091 extern long        md_pcrel_from_section  (fixS *, segT);
00092 extern arelent *   tc_gen_reloc           (asection *, fixS *);
00093 extern int         mcore_force_relocation (fixS *);
00094 extern bfd_boolean mcore_fix_adjustable   (fixS *);
00095 
00096 #endif /* TC_MCORE */