From: Ken Raeburn Date: Thu, 4 May 1995 01:56:40 +0000 (+0000) Subject: * as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already defined, define X-Git-Tag: gdb-4_18~11829 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9777b772c83b4996e96dc175f0b6ea0cf0d589b1;p=external%2Fbinutils.git * as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already defined, define them to zero. * config/tc-*.h, config/te-*.h: If defining them, define them to be 1 instead of empty. * expr.c (integer_constant, operand): Test them at run time instead of compile time. * read.c (read_a_source_file): Ditto. * symbols.c (colon): Ditto. (dollar_*, define_dollar_label, fb_*): Define unconditionally. * symbols.h (dollar_*, define_dollar_label, fb_*): Declare unconditionally. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 333f125..e7a8b0c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,17 @@ +Wed May 3 21:38:20 1995 Ken Raeburn + + * as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already + defined, define them to zero. + * config/tc-*.h, config/te-*.h: If defining them, define them to + be 1 instead of empty. + * expr.c (integer_constant, operand): Test them at run time + instead of compile time. + * read.c (read_a_source_file): Ditto. + * symbols.c (colon): Ditto. + (dollar_*, define_dollar_label, fb_*): Define unconditionally. + * symbols.h (dollar_*, define_dollar_label, fb_*): Declare + unconditionally. + Wed May 3 13:08:53 1995 Jeff Law (law@snake.cs.utah.edu) * config/tc-hppa.c (md_apply_fix): Do nothing for an out of range diff --git a/gas/as.h b/gas/as.h index cc87618..7477388 100644 --- a/gas/as.h +++ b/gas/as.h @@ -105,6 +105,7 @@ extern char *strdup (/* const char * */); #define __PRETTY_FUNCTION__ ((char*)0) #endif #if 0 + /* Handle lossage with assert.h. */ #ifndef BROKEN_ASSERT #include @@ -115,8 +116,13 @@ extern char *strdup (/* const char * */); #define assert(p) ((p), 0) #endif #endif /* BROKEN_ASSERT */ + #else + #define assert(P) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)) +#undef abort +#define abort() as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__) + #endif @@ -151,6 +157,11 @@ extern int errno; #define unlink remove #endif +/* Hack to make "gcc -Wall" not complain about obstack macros. */ +#if !defined (memcpy) && !defined (bcopy) +#define bcopy(src,dest,size) memcpy(dest,src,size) +#endif + #ifdef BFD_ASSEMBLER /* This one doesn't get declared, but we're using it anyways. This should be fixed -- either it's part of the external interface or @@ -309,7 +320,7 @@ COMMON segT now_seg; #ifdef BFD_ASSEMBLER #define segment_name(SEG) bfd_get_section_name (stdoutput, SEG) #else -extern char *const seg_name[]; +extern char const *const seg_name[]; #define segment_name(SEG) seg_name[(int) (SEG)] #endif @@ -498,7 +509,7 @@ extern int listing; struct _pseudo_type { /* assembler mnemonic, lower case, no '.' */ - char *poc_name; + const char *poc_name; /* Do the work */ void (*poc_handler) PARAMS ((int)); /* Value to pass to handler */ @@ -546,6 +557,7 @@ PRINTF_LIKE (as_warn); PRINTF_WHERE_LIKE (as_bad_where); PRINTF_WHERE_LIKE (as_warn_where); void as_assert PARAMS ((const char *, int, const char *)); +void as_abort PARAMS ((const char *, int, const char *)); void fprint_value PARAMS ((FILE *file, addressT value)); void sprint_value PARAMS ((char *buf, addressT value)); @@ -593,6 +605,7 @@ segT subseg_get PARAMS ((const char *, int)); struct expressionS; struct fix; struct symbol; +struct relax_type; #ifdef BFD_ASSEMBLER /* literal.c */ @@ -616,21 +629,13 @@ valueT add_to_literal_pool PARAMS ((struct symbol *, valueT, segT, int)); #include "listing.h" -#ifdef BFD_ASSEMBLER -/* Someday perhaps this will be selectable at run-time. */ -#if defined (OBJ_AOUT) || defined (OBJ_BOUT) -#define OUTPUT_FLAVOR bfd_target_aout_flavour -#endif -#ifdef OBJ_COFF -#define OUTPUT_FLAVOR bfd_target_coff_flavour +#ifndef LOCAL_LABELS_DOLLAR +#define LOCAL_LABELS_DOLLAR 0 #endif -#ifdef OBJ_ECOFF -#define OUTPUT_FLAVOR bfd_target_ecoff_flavour -#endif -#ifdef OBJ_ELF -#define OUTPUT_FLAVOR bfd_target_elf_flavour + +#ifndef LOCAL_LABELS_FB +#define LOCAL_LABELS_FB 0 #endif -#endif /* BFD_ASSEMBLER */ #endif /* GAS */ diff --git a/gas/config/tc-mips.h b/gas/config/tc-mips.h index ba6d1b4..f0f9692 100644 --- a/gas/config/tc-mips.h +++ b/gas/config/tc-mips.h @@ -31,7 +31,7 @@ #define REPEAT_CONS_EXPRESSIONS #define RELOC_EXPANSION_POSSIBLE #define MAX_RELOC_EXPANSION 3 -#define LOCAL_LABELS_FB +#define LOCAL_LABELS_FB 1 /* The MIPS assembler appears to keep all symbols. */ #define LOCAL_LABEL(name) 0 diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h index 82a1841..03588d9 100644 --- a/gas/config/tc-ppc.h +++ b/gas/config/tc-ppc.h @@ -37,17 +37,19 @@ extern enum bfd_architecture ppc_arch PARAMS ((void)); #endif /* Permit temporary numeric labels. */ -#define LOCAL_LABELS_FB +#define LOCAL_LABELS_FB 1 /* $ is used to refer to the current location. */ #define DOLLAR_DOT -/* Strings do not use backslash escapes. */ +/* Strings do not use backslash escapes under COFF. */ +#ifdef OBJ_COFF #define NO_STRING_ESCAPES +#endif -#ifdef OBJ_COFF /* When using COFF, we determine whether or not to output a symbol based on sy_tc.output, not on the name. */ +#ifdef OBJ_COFF #define LOCAL_LABEL(name) 0 #endif #ifdef OBJ_ELF @@ -55,6 +57,7 @@ extern enum bfd_architecture ppc_arch PARAMS ((void)); #define LOCAL_LABEL(name) (name[0] == '.' \ && (name[1] == 'L' || name[1] == '.')) #define FAKE_LABEL_NAME ".L0\001" +#define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */ #endif /* Set the endianness we are using. Default to big endian. */ @@ -154,4 +157,9 @@ extern void ppc_frob_file PARAMS ((void)); #ifndef GLOBAL_OFFSET_TABLE_NAME #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" #endif -#endif +#endif /* OBJ_ELF */ + +/* call md_apply_fix3 with segment instead of md_apply_fix */ +#define MD_APPLY_FIX3 + +#define md_operand(x) diff --git a/gas/config/te-generic.h b/gas/config/te-generic.h index 8542dd0..880ac50 100644 --- a/gas/config/te-generic.h +++ b/gas/config/te-generic.h @@ -9,8 +9,8 @@ /* Added these, because if we don't know what we're targetting we may need an assembler version of libgcc, and that will use local labels. */ -#define LOCAL_LABELS_DOLLAR -#define LOCAL_LABELS_FB +#define LOCAL_LABELS_DOLLAR 1 +#define LOCAL_LABELS_FB 1 /* these define interfaces */ #include "obj-format.h" diff --git a/gas/config/te-hp300.h b/gas/config/te-hp300.h index afc8c5e..7b053f7 100644 --- a/gas/config/te-hp300.h +++ b/gas/config/te-hp300.h @@ -17,8 +17,8 @@ along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define LOCAL_LABELS_DOLLAR -#define LOCAL_LABELS_FB +#define LOCAL_LABELS_DOLLAR 1 +#define LOCAL_LABELS_FB 1 #include "obj-format.h" diff --git a/gas/config/te-ppcnw.h b/gas/config/te-ppcnw.h index aa26b5e..189dba1 100644 --- a/gas/config/te-ppcnw.h +++ b/gas/config/te-ppcnw.h @@ -20,8 +20,8 @@ /* Added these, because if we don't know what we're targetting we may need an assembler version of libgcc, and that will use local labels. */ -#define LOCAL_LABELS_DOLLAR -#define LOCAL_LABELS_FB +#define LOCAL_LABELS_DOLLAR 1 +#define LOCAL_LABELS_FB 1 /* these define interfaces */ #include "obj-format.h" diff --git a/gas/read.c b/gas/read.c index c06f354..04d6bd2 100644 --- a/gas/read.c +++ b/gas/read.c @@ -573,8 +573,8 @@ read_a_source_file (name) if (is_end_of_line[(unsigned char) c]) continue; -#if defined(LOCAL_LABELS_DOLLAR) || defined(LOCAL_LABELS_FB) - if (isdigit (c)) + if ((LOCAL_LABELS_DOLLAR || LOCAL_LABELS_FB) + && isdigit (c)) { /* local label ("4:") */ char *backup = input_line_pointer; @@ -589,8 +589,8 @@ read_a_source_file (name) ++input_line_pointer; } /* read the whole number */ -#ifdef LOCAL_LABELS_DOLLAR - if (*input_line_pointer == '$' + if (LOCAL_LABELS_DOLLAR + && *input_line_pointer == '$' && *(input_line_pointer + 1) == ':') { input_line_pointer += 2; @@ -604,20 +604,17 @@ read_a_source_file (name) colon (dollar_label_name (temp, 0)); continue; } -#endif /* LOCAL_LABELS_DOLLAR */ -#ifdef LOCAL_LABELS_FB - if (*input_line_pointer++ == ':') + if (LOCAL_LABELS_FB + && *input_line_pointer++ == ':') { fb_label_instance_inc (temp); colon (fb_label_name (temp, 0)); continue; } -#endif /* LOCAL_LABELS_FB */ input_line_pointer = backup; } /* local label ("4:") */ -#endif /* LOCAL_LABELS_DOLLAR or LOCAL_LABELS_FB */ if (c && strchr (line_comment_chars, c)) { /* Its a comment. Better say APP or NO_APP */