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 21:38:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * 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
#define __PRETTY_FUNCTION__ ((char*)0)
#endif
#if 0
+
/* Handle lossage with assert.h. */
#ifndef BROKEN_ASSERT
#include <assert.h>
#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
#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
#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
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 */
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));
struct expressionS;
struct fix;
struct symbol;
+struct relax_type;
#ifdef BFD_ASSEMBLER
/* literal.c */
#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 */
#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
#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
#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. */
#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)
/* 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"
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"
/* 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"
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;
++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;
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 */