diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-09-04 19:11:21 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-09-04 19:11:21 +0000 |
commit | c3c8d76890b592bf5acc1a9b7faeabd9b829dd71 (patch) | |
tree | 6358a23d0df9de73b6d5d6d3a75545ff35f05b47 /gnu/usr.bin/binutils/gas/config/tc-sh.h | |
parent | 4ba440a6e788da3a64fa29b782c37150a3f5cc18 (diff) |
Merge the Cygnus 960904 sources
Diffstat (limited to 'gnu/usr.bin/binutils/gas/config/tc-sh.h')
-rw-r--r-- | gnu/usr.bin/binutils/gas/config/tc-sh.h | 90 |
1 files changed, 62 insertions, 28 deletions
diff --git a/gnu/usr.bin/binutils/gas/config/tc-sh.h b/gnu/usr.bin/binutils/gas/config/tc-sh.h index 5be23502fca..6e7909fc055 100644 --- a/gnu/usr.bin/binutils/gas/config/tc-sh.h +++ b/gnu/usr.bin/binutils/gas/config/tc-sh.h @@ -1,5 +1,4 @@ /* This file is tc-sh.h - Copyright (C) 1993, 94, 95, 1996 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -21,18 +20,17 @@ #define TC_SH -/* This macro translates between an internal fix and an coff reloc type */ -#define TC_COFF_FIX2RTYPE(fix) ((fix)->fx_r_type) - -#define BFD_ARCH bfd_arch_sh +#define TARGET_ARCH bfd_arch_sh +/* Whether in little endian mode. */ extern int shl; -#define COFF_MAGIC (shl ? SH_ARCH_MAGIC_LITTLE : SH_ARCH_MAGIC_BIG) - /* Whether -relax was used. */ extern int sh_relax; +/* Don't try to break words. */ +#define WORKING_DOT_WORD + /* When relaxing, we need to generate relocations for alignment directives. */ #define HANDLE_ALIGN(frag) sh_handle_align (frag) @@ -42,36 +40,15 @@ extern void sh_handle_align PARAMS ((fragS *)); #define TC_FORCE_RELOCATION(fix) sh_force_relocation (fix) extern int sh_force_relocation (); -/* We need to write out relocs which have not been completed. */ -#define TC_COUNT_RELOC(fix) ((fix)->fx_addsy != NULL) - -#define TC_RELOC_MANGLE(seg, fix, int, paddr) \ - sh_coff_reloc_mangle ((seg), (fix), (int), (paddr)) -extern void sh_coff_reloc_mangle (); - #define IGNORE_NONSTANDARD_ESCAPES -#define tc_coff_symbol_emit_hook(a) ; /* not used */ - -#define DO_NOT_STRIP 0 -#define DO_STRIP 0 #define LISTING_HEADER (shl ? "Hitachi Super-H GAS Little Endian" : "Hitachi Super-H GAS Big Endian") -#define NEED_FX_R_TYPE 1 -#define RELOC_32 1234 - -#define TC_KEEP_FX_OFFSET 1 - -#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag) -extern int tc_coff_sizemachdep PARAMS ((fragS *)); #define md_operand(x) extern const struct relax_type md_relax_table[]; #define TC_GENERIC_RELAX_TABLE md_relax_table -#define tc_frob_file sh_coff_frob_file -extern void sh_coff_frob_file PARAMS (()); - /* We use a special alignment function to insert the correct nop pattern. */ extern int sh_do_align PARAMS ((int, const char *, int)); @@ -95,4 +72,61 @@ extern void sh_frob_label PARAMS ((void)); extern void sh_flush_pending_output PARAMS ((void)); #define md_flush_pending_output() sh_flush_pending_output () +#ifdef BFD_ASSEMBLER +#define tc_frob_file_before_adjust sh_frob_file +#else +#define tc_frob_file sh_frob_file +#endif +extern void sh_frob_file PARAMS ((void)); + +#ifdef OBJ_COFF +/* COFF specific definitions. */ + +#define DO_NOT_STRIP 0 + +/* This macro translates between an internal fix and an coff reloc type */ +#define TC_COFF_FIX2RTYPE(fix) ((fix)->fx_r_type) + +#define BFD_ARCH TARGET_ARCH + +#define COFF_MAGIC (shl ? SH_ARCH_MAGIC_LITTLE : SH_ARCH_MAGIC_BIG) + +/* We need to write out relocs which have not been completed. */ +#define TC_COUNT_RELOC(fix) ((fix)->fx_addsy != NULL) + +#define TC_RELOC_MANGLE(seg, fix, int, paddr) \ + sh_coff_reloc_mangle ((seg), (fix), (int), (paddr)) +extern void sh_coff_reloc_mangle (); + +#define tc_coff_symbol_emit_hook(a) ; /* not used */ + +#define NEED_FX_R_TYPE 1 + +#define TC_KEEP_FX_OFFSET 1 + +#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag) +extern int tc_coff_sizemachdep PARAMS ((fragS *)); + +/* We align most sections to a 16 byte boundary. */ +#define SUB_SEGMENT_ALIGN(SEG) \ + (strncmp (obj_segment_name (SEG), ".stabstr", 8) == 0 \ + ? 0 \ + : ((strncmp (obj_segment_name (SEG), ".stab", 5) == 0 \ + || strcmp (obj_segment_name (SEG), ".ctors") == 0 \ + || strcmp (obj_segment_name (SEG), ".dtors") == 0) \ + ? 2 \ + : 4)) + +#endif /* OBJ_COFF */ + +#ifdef OBJ_ELF +/* ELF specific definitions. */ + +/* Whether or not the target is big endian */ +extern int target_big_endian; + +#define TARGET_FORMAT (shl ? "elf32-shl" : "elf32-sh") + +#endif /* OBJ_ELF */ + /* end of tc-sh.h */ |