diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-02-28 20:04:39 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-02-28 20:04:39 +0000 |
commit | 236049217663ad79c7f522d6442332a346ff4d53 (patch) | |
tree | bb560fed03778aeeaa5b36178522df7ad4761a57 /gas | |
parent | e691320ea4711f41b7e934013ac70c1ff72b5eaf (diff) | |
download | gdb-236049217663ad79c7f522d6442332a346ff4d53.zip gdb-236049217663ad79c7f522d6442332a346ff4d53.tar.gz gdb-236049217663ad79c7f522d6442332a346ff4d53.tar.bz2 |
* write.h (LOCAL_LABEL): Only define if not BFD_ASSEMBLER.
(S_LOCAL_NAME): Likewise.
(FAKE_LABEL_NAME): Define unconditionally.
* symbols.c (colon): Call bfd_is_local_label, not LOCAL_LABEL, if
BFD_ASSEMBLER.
(S_IS_LOCAL): Call bfd_is_local_label_name, not LOCAL_LABEL.
* config/tc-*.h: Only define LOCAL_LABEL if not BFD_ASSEMBLER.
Don't define FAKE_LABEL_NAME.
* config/te-ic960.h: Likewise.
* config/tc-mips.h (tc_frob_file_before_adjust): Define.
(mips_frob_file_before_adjust): Declare.
* config/tc-mips.c (mips_frob_file_before_adjust): New function.
(mips_local_label): Remove.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 18 | ||||
-rw-r--r-- | gas/config/tc-arm.h | 19 | ||||
-rw-r--r-- | gas/config/tc-m88k.h | 3 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 45 | ||||
-rw-r--r-- | gas/config/te-ic960.h | 14 |
5 files changed, 58 insertions, 41 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1c18e52..adcd663 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,21 @@ +Fri Feb 28 14:40:00 1997 Ian Lance Taylor <ian@cygnus.com> + + * write.h (LOCAL_LABEL): Only define if not BFD_ASSEMBLER. + (S_LOCAL_NAME): Likewise. + (FAKE_LABEL_NAME): Define unconditionally. + * symbols.c (colon): Call bfd_is_local_label, not LOCAL_LABEL, if + BFD_ASSEMBLER. + (S_IS_LOCAL): Call bfd_is_local_label_name, not LOCAL_LABEL. + * config/tc-*.h: Only define LOCAL_LABEL if not BFD_ASSEMBLER. + Don't define FAKE_LABEL_NAME. + * config/te-ic960.h: Likewise. + * config/tc-mips.h (tc_frob_file_before_adjust): Define. + (mips_frob_file_before_adjust): Declare. + * config/tc-mips.c (mips_frob_file_before_adjust): New function. + (mips_local_label): Remove. + + * config/te-sco386.h: Remove; not used. + start-sanitize-tic80 Thu Feb 27 15:39:16 1997 Fred Fish <fnf@cygnus.com> diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index 149579e..0214d68 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -1,9 +1,8 @@ /* This file is tc-arm.h + Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modified by David Taylor (dtaylor@armltd.co.uk) - Copyright (C) 1994, 1995 Free Software Foundation, Inc. - This file is part of GAS, the GNU Assembler. GAS is free software; you can redistribute it and/or modify @@ -17,11 +16,16 @@ GNU General Public License for more details. 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #define TC_ARM 1 +#ifndef TARGET_BYTES_BIG_ENDIAN +#define TARGET_BYTES_BIG_ENDIAN 0 +#endif + #define COFF_MAGIC ARMMAGIC #define TARGET_ARCH bfd_arch_arm @@ -32,10 +36,6 @@ #define LITTLE_ENDIAN 1234 #define BIG_ENDIAN 4321 -#ifndef TARGET_BYTES_BIG_ENDIAN -#define TARGET_BYTES_BIG_ENDIAN 0 -#endif - #ifdef OBJ_AOUT #ifdef TE_RISCIX #define TARGET_FORMAT "a.out-riscix" @@ -111,9 +111,10 @@ char *arm_canonicalize_symbol_name PARAMS ((char *)); #define LOCAL_LABELS_FB 1 /* Use defaults for OBJ_AOUT. */ +#ifndef BFD_ASSEMBLER #ifndef OBJ_AOUT #define LOCAL_LABEL(name) ((name)[0] == '.' && (name)[1] == 'L') -#define FAKE_LABEL_NAME ".L0\001" +#endif #endif /* end of tc-arm.h */ diff --git a/gas/config/tc-m88k.h b/gas/config/tc-m88k.h index f26580f..c51da81 100644 --- a/gas/config/tc-m88k.h +++ b/gas/config/tc-m88k.h @@ -62,9 +62,12 @@ struct reloc_info_m88k /* The m88k uses '@' to start local labels. */ #define LEX_AT (LEX_BEGIN_NAME | LEX_NAME) + +#ifndef BFD_ASSEMBLER #define LOCAL_LABEL(name) \ ((name[0] =='@' && (name [1] == 'L' || name [1] == '.')) \ || (name[0] == 'L' && name[1] == '0' && name[2] == '\001')) +#endif /* The m88k uses pseudo-ops with no leading period. */ #define NO_PSEUDO_DOT diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 862b455..31b5d1f 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -8516,6 +8516,24 @@ cons_fix_new_mips (frag, where, nbytes, exp) : (nbytes == 4 ? BFD_RELOC_32 : BFD_RELOC_64))); } +/* This is called before the symbol table is processed. In order to + work with gcc when using mips-tfile, we must keep all local labels. + However, in other cases, we want to discard them. If we were + called with -g, but we didn't see any debugging information, it may + mean that gcc is smuggling debugging information through to + mips-tfile, in which case we must generate all local labels. */ + +void +mips_frob_file_before_adjust () +{ +#ifndef NO_ECOFF_DEBUGGING + if (ECOFF_DEBUGGING + && mips_debug != 0 + && ! ecoff_debugging_seen) + flag_keep_locals = 1; +#endif +} + /* Sort any unmatched HI16_S relocs so that they immediately precede the corresponding LO reloc. This is called before md_apply_fix and tc_gen_reloc. Unmatched HI16_S relocs can only be generated by @@ -10354,33 +10372,6 @@ mips_define_label (sym) l->next = insn_labels; insn_labels = l; } - -/* Decide whether a label is local. This is called by LOCAL_LABEL. - In order to work with gcc when using mips-tfile, we must keep all - local labels. However, in other cases, we want to discard them, - since they are useless. */ - -int -mips_local_label (name) - const char *name; -{ -#ifndef NO_ECOFF_DEBUGGING - if (ECOFF_DEBUGGING - && mips_debug != 0 - && ! ecoff_debugging_seen) - { - /* We were called with -g, but we didn't see any debugging - information. That may mean that gcc is smuggling debugging - information through to mips-tfile, in which case we must - generate all local labels. */ - return 0; - } -#endif - - /* Here it's OK to discard local labels. */ - - return name[0] == '$'; -} #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) diff --git a/gas/config/te-ic960.h b/gas/config/te-ic960.h index 76b0873..8331fb9 100644 --- a/gas/config/te-ic960.h +++ b/gas/config/te-ic960.h @@ -1,6 +1,5 @@ -/* This file is twe-ic960.h - - Copyright (C) 1987-1992 Free Software Foundation, Inc. +/* This file is te-ic960.h + Copyright (C) 1987-1992, 94, 95, 1997 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,8 +14,9 @@ GNU General Public License for more details. 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* * This file is te-ic960.h and is intended to define ic960 environment @@ -24,11 +24,15 @@ */ #define OBJ_COFF_OMIT_OPTIONAL_HEADER + +#ifndef BFD_ASSEMBLER #define LOCAL_LABEL(name) ((name[0] =='L') \ || (name[0] =='.' \ && (name[1]=='C' \ || name[1]=='I' \ || name[1]=='.'))) +#endif + #include "obj-format.h" /* end of te-ic960.h */ |