diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-02-12 20:33:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-02-12 20:33:06 +0000 |
commit | a043f579dfeef80f68f5533144c29987d935b121 (patch) | |
tree | 78fbd2ebdae21c7d9980c29d6506c497e82de219 /gas/config/tc-m68k.h | |
parent | 0e1ad456ce784bccd351002d31f47b8564559161 (diff) | |
download | gdb-a043f579dfeef80f68f5533144c29987d935b121.zip gdb-a043f579dfeef80f68f5533144c29987d935b121.tar.gz gdb-a043f579dfeef80f68f5533144c29987d935b121.tar.bz2 |
Mon Feb 12 15:16:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Support for OBJ_ELF on m68k, mostly inside #ifdef OBJ_ELF:
* config/m68k-parse.h (enum pic_relocation): Define.
(struct m68k_exp): Add pic_reloc field.
* config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
(tc_fix_adjustable): Define to call tc_m68k_fix_adjustable.
(NO_RELOC): Define to BFD_RELOC_NONE if BFD_ASSEMBLER, to zero
otherwise.
* config/tc-m68k.c: Delete definition of NO_RELOC.
(struct m68k_it): Add pic_reloc field.
(add_fix): Copy over pic_reloc field.
(md_pseudo_table): Interpret .align parameter as byte count.
(mote_pseudo_table): Likewise.
(tc_m68k_fix_adjustable): New function.
(get_reloc_code): New function.
(md_assemble): Use it as last argument to fix_new_exp.
(md_apply_fix_2): For a relocation against a symbol don't put the
addend into the data.
(tc_gen_reloc): Different addend computation for OBJ_ELF.
(m68k_ip): Don't relax an operand that requires pic relocation.
(md_begin): Align .text, .data and .bss on 4 byte boundary by
default.
* write.c (fixup_segment): Don't add symbol value to addend if
TC_M68K and OBJ_ELF.
* config/m68k-parse.y (yylex): Handle @PLTPC, etc.
(motorola_operand): Add rule for `(zapc, EXPR)'.
Diffstat (limited to 'gas/config/tc-m68k.h')
-rw-r--r-- | gas/config/tc-m68k.h | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/gas/config/tc-m68k.h b/gas/config/tc-m68k.h index 36abd6c..3f99de9 100644 --- a/gas/config/tc-m68k.h +++ b/gas/config/tc-m68k.h @@ -1,6 +1,7 @@ /* This file is tc-m68k.h - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright (C) 1987, 89, 90, 91, 92, 93, 94, 95, 1996 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -16,12 +17,26 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define TC_M68K 1 +#define TARGET_BYTES_BIG_ENDIAN 1 + #ifdef OBJ_AOUT +#ifdef TE_SUN3 #define TARGET_FORMAT "a.out-sunos-big" +#else +#ifdef TE_NetBSD +#define TARGET_FORMAT "a.out-m68k-netbsd" +#else +#define TARGET_FORMAT "a.out-zero-big" +#endif +#endif +#endif + +#ifdef OBJ_ELF +#define TARGET_FORMAT "elf32-m68k" #endif #ifdef TE_APOLLO @@ -33,16 +48,21 @@ #ifdef TE_LYNX #define TARGET_FORMAT "coff-m68k-lynx" #endif +#ifdef TE_AUX +#define TARGET_FORMAT "coff-m68k-aux" +#endif #ifndef COFF_MAGIC #define COFF_MAGIC MC68MAGIC #endif -#define BFD_ARCH bfd_arch_m68k +#define BFD_ARCH bfd_arch_m68k /* for non-BFD_ASSEMBLER */ +#define TARGET_ARCH bfd_arch_m68k /* BFD_ASSEMBLER */ #define COFF_FLAGS F_AR32W #define TC_COUNT_RELOC(x) ((x)->fx_addsy||(x)->fx_subsy) #define TC_COFF_FIX2RTYPE(fixP) tc_coff_fix2rtype(fixP) #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag) +extern int tc_coff_sizemachdep PARAMS ((struct frag *)); #ifdef TE_SUN3 /* This variable contains the value to write out at the beginning of the a.out file. The 2<<16 means that this is a 68020 file instead @@ -77,7 +97,7 @@ extern int m68k_aout_machtype; #endif #if !defined (REGISTER_PREFIX_OPTIONAL) -#ifdef M68KCOFF +#if defined (M68KCOFF) || defined (OBJ_ELF) #define LOCAL_LABEL(name) (name[0] == '.' \ && (name[1] == 'L' || name[1] == '.')) #define FAKE_LABEL_NAME ".L0\001" @@ -92,11 +112,36 @@ extern int m68k_aout_machtype; can't be used as the initial character. If that's not true, more work will be needed to fix this up. */ #define LEX_PCT 1 +/* On the Delta, dots are not required before pseudo-ops. */ +#define NO_PSEUDO_DOT #endif #ifdef BFD_ASSEMBLER + #define tc_frob_symbol(sym,punt) \ if (S_GET_SEGMENT (sym) == reg_section) punt = 1 + +#define NO_RELOC BFD_RELOC_NONE + +#ifdef OBJ_ELF + +/* This expression evaluates to false if the relocation is for a local object + for which we still want to do the relocation at runtime. True if we + are willing to perform this relocation while building the .o file. */ + +#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \ + ((FIX)->fx_r_type != BFD_RELOC_8_PLT_PCREL \ + && (FIX)->fx_r_type != BFD_RELOC_16_PLT_PCREL \ + && (FIX)->fx_r_type != BFD_RELOC_32_PLT_PCREL \ + && (FIX)->fx_r_type != BFD_RELOC_8_GOT_PCREL \ + && (FIX)->fx_r_type != BFD_RELOC_16_GOT_PCREL \ + && (FIX)->fx_r_type != BFD_RELOC_32_GOT_PCREL) + +#define tc_fix_adjustable(X) tc_m68k_fix_adjustable(X) +#endif + +#else +#define NO_RELOC 0 #endif #define DIFF_EXPR_OK @@ -107,4 +152,12 @@ extern void m68k_init_after_args PARAMS ((void)); extern int m68k_parse_long_option PARAMS ((char *)); #define md_parse_long_option m68k_parse_long_option +#define md_operand(x) + +#define TARGET_WORD_SIZE 32 +#define TARGET_ARCH bfd_arch_m68k + +extern struct relax_type md_relax_table[]; +#define TC_GENERIC_RELAX_TABLE md_relax_table + /* end of tc-m68k.h */ |