aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/ChangeLog52
-rw-r--r--gas/Makefile.am3
-rw-r--r--gas/Makefile.in23
-rw-r--r--gas/as.c2
-rw-r--r--gas/as.h2
-rw-r--r--gas/bignum-copy.c80
-rw-r--r--gas/bignum.h13
-rw-r--r--gas/config/obj-coff.c2
-rw-r--r--gas/config/tc-i386.c4
-rw-r--r--gas/config/tc-vax.c54
-rw-r--r--gas/doc/internals.texi5
-rw-r--r--gas/expr.c29
-rw-r--r--gas/expr.h2
-rw-r--r--gas/hash.c54
-rw-r--r--gas/hash.h12
-rw-r--r--gas/input-file.c6
-rw-r--r--gas/input-file.h1
-rw-r--r--gas/input-scrub.c37
-rw-r--r--gas/macro.c2
-rw-r--r--gas/messages.c18
-rw-r--r--gas/read.c47
-rw-r--r--gas/read.h3
-rw-r--r--gas/sb.c57
-rw-r--r--gas/sb.h7
-rw-r--r--gas/symbols.c17
-rw-r--r--gas/symbols.h3
26 files changed, 153 insertions, 382 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7fa1ed7..23c63e9 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,55 @@
+2005-04-29 Ben Elliston <bje@au.ibm.com>
+
+ * Makefile.am (GAS_CFILES): Remove bignum-copy.c.
+ (GENERIC_OBJS): Likewise, remove bignum-copy.o.
+ (bignum-copy.o): Remove.
+ * Makefile.in: Regenerate.
+ * makefile.vms (OBJS): Remove bignum-copy.obj.
+ * symbols.h (local_symbol_make): Remove declaration.
+ (verify_symbol_chain_2): Likewise.
+ * symbols.c (local_symbol_make): Make static.
+ (max_indent_level): Likewise.
+ (verify_symbol_chain_2): Remove.
+ * macro.c (macro_hash): Make static.
+ * messages.c (fprint_value): Remove.
+ * read.h (get_absolute_expr): Remove.
+ (emit_leb128_expr): Likewise.
+ (do_s_func): Likewise.
+ * read.c (do_s_func): Make static.
+ (emit_leb128_expr): Likewise.
+ (get_absolute_expr): Likewise.
+ * as.h (as_howmuch): Remove declaration.
+ (fprint_value): Likewise.
+ * as.c (myname): Make static.
+ * input-scrub.c (as_howmuch): Remove.
+ (as_1_char): Likewise.
+ * input-file.h (input_file_is_open): Remove.
+ * input-file.c (input_file_is_open): Likewise.
+ * expr.h (expr_build_unary): Remove declaration.
+ (expr_build_binary): Likewise.
+ * expr.c (expr_build_unary): Remove.
+ (expr_build_binary): Likewise.
+ * hash.h (hash_replace): Remove declaration.
+ (hash_delete): Likewise.
+ * hash.c (hash_replace): Remove.
+ (hash_delete): Likewise.
+ * bignum-copy.c (bignum_copy): Move from here ..
+ * config/tc-vax.c (bignum_copy): .. to here.
+ * bignum.h (LOG_TO_BASE_2_OF_10): Remove.
+ (bignum_copy): Remove extern declaration.
+ * sb.h (string_count): Remove extern declaration.
+ (sb_build, sb_add_buffer, sb_print, sb_print_at): Likewise.
+ (sb_name): Likewise.
+ * sb.c (dsize): Replace preprocessor macro with static int.
+ (string_count): Make static.
+ (sb_build, sb_add_buffer, sb_print, sb_print_at): Likewise.
+ (sb_name): Likewise.
+ * config/obj-coff.c (dim_index): Make static.
+ * config/tc-i386.c (GOT_symbol): Likewise.
+ (output_invalid_buf): Likewise.
+ * doc/internals.texi (Warning and error messages): Remove the
+ prototype for fprint_value.
+
2005-04-27 Ben Elliston <bje@au.ibm.com>
* link.cmd: Remove.
diff --git a/gas/Makefile.am b/gas/Makefile.am
index dcf3e22..51f1f50 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -177,7 +177,6 @@ GAS_CFILES = \
app.c \
as.c \
atof-generic.c \
- bignum-copy.c \
cond.c \
depend.c \
dwarf2dbg.c \
@@ -427,7 +426,6 @@ GENERIC_OBJS = \
app.o \
as.o \
atof-generic.o \
- bignum-copy.o \
cond.o \
depend.o \
dwarf2dbg.o \
@@ -2444,7 +2442,6 @@ as.o: as.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
output-file.h sb.h macro.h dwarf2dbg.h dw2gencfi.h hash.h \
$(INCDIR)/elf/dwarf2.h $(BFDVER_H)
atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h
-bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
depend.o: depend.c $(INCDIR)/symcat.h
dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/symcat.h dwarf2dbg.h \
diff --git a/gas/Makefile.in b/gas/Makefile.in
index bf49565..3fae307 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -64,15 +64,15 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = gdb.ini .gdbinit po/Makefile.in
PROGRAMS = $(noinst_PROGRAMS)
am__objects_1 = app.$(OBJEXT) as.$(OBJEXT) atof-generic.$(OBJEXT) \
- bignum-copy.$(OBJEXT) cond.$(OBJEXT) depend.$(OBJEXT) \
- dwarf2dbg.$(OBJEXT) dw2gencfi.$(OBJEXT) ecoff.$(OBJEXT) \
- ehopt.$(OBJEXT) expr.$(OBJEXT) flonum-copy.$(OBJEXT) \
- flonum-konst.$(OBJEXT) flonum-mult.$(OBJEXT) frags.$(OBJEXT) \
- hash.$(OBJEXT) input-file.$(OBJEXT) input-scrub.$(OBJEXT) \
- listing.$(OBJEXT) literal.$(OBJEXT) macro.$(OBJEXT) \
- messages.$(OBJEXT) output-file.$(OBJEXT) read.$(OBJEXT) \
- sb.$(OBJEXT) stabs.$(OBJEXT) subsegs.$(OBJEXT) \
- symbols.$(OBJEXT) write.$(OBJEXT)
+ cond.$(OBJEXT) depend.$(OBJEXT) dwarf2dbg.$(OBJEXT) \
+ dw2gencfi.$(OBJEXT) ecoff.$(OBJEXT) ehopt.$(OBJEXT) \
+ expr.$(OBJEXT) flonum-copy.$(OBJEXT) flonum-konst.$(OBJEXT) \
+ flonum-mult.$(OBJEXT) frags.$(OBJEXT) hash.$(OBJEXT) \
+ input-file.$(OBJEXT) input-scrub.$(OBJEXT) listing.$(OBJEXT) \
+ literal.$(OBJEXT) macro.$(OBJEXT) messages.$(OBJEXT) \
+ output-file.$(OBJEXT) read.$(OBJEXT) sb.$(OBJEXT) \
+ stabs.$(OBJEXT) subsegs.$(OBJEXT) symbols.$(OBJEXT) \
+ write.$(OBJEXT)
am_as_new_OBJECTS = $(am__objects_1)
as_new_OBJECTS = $(am_as_new_OBJECTS)
am__DEPENDENCIES_1 = tc-@target_cpu_type@.o
@@ -405,7 +405,6 @@ GAS_CFILES = \
app.c \
as.c \
atof-generic.c \
- bignum-copy.c \
cond.c \
depend.c \
dwarf2dbg.c \
@@ -654,7 +653,6 @@ GENERIC_OBJS = \
app.o \
as.o \
atof-generic.o \
- bignum-copy.o \
cond.o \
depend.o \
dwarf2dbg.o \
@@ -3361,7 +3359,6 @@ as.o: as.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
output-file.h sb.h macro.h dwarf2dbg.h dw2gencfi.h hash.h \
$(INCDIR)/elf/dwarf2.h $(BFDVER_H)
atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h
-bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
depend.o: depend.c $(INCDIR)/symcat.h
dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/symcat.h dwarf2dbg.h \
diff --git a/gas/as.c b/gas/as.c
index 507124f..6b76c2f 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -99,7 +99,7 @@ static enum debug_info_type (*md_debug_format_selector) (int *) = MD_DEBUG_FORMA
int max_macro_nest = 100;
/* argv[0] */
-char * myname;
+static char * myname;
/* The default obstack chunk size. If we set this to zero, the
obstack code will use whatever will fit in a 4096 byte block. */
diff --git a/gas/as.h b/gas/as.h
index f3fde9b..6923b07 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -563,7 +563,6 @@ PRINTF_WHERE_LIKE (as_warn_where);
void as_assert (const char *, int, const char *);
void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
-void fprint_value (FILE *, addressT);
void sprint_value (char *, addressT);
int had_errors (void);
int had_warnings (void);
@@ -585,7 +584,6 @@ void cond_finish_check (int);
void cond_exit_macro (int);
int seen_at_least_1_file (void);
void app_pop (char *);
-void as_howmuch (FILE *);
void as_perror (const char *, const char *);
void as_where (char **, unsigned int *);
void bump_line_counters (void);
diff --git a/gas/bignum-copy.c b/gas/bignum-copy.c
deleted file mode 100644
index c476be8..0000000
--- a/gas/bignum-copy.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* bignum_copy.c - copy a bignum
- Copyright 1987, 1990, 1991, 1992, 1993, 2000, 2003
- Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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. */
-
-#include "as.h"
-
-/*
- * bignum_copy ()
- *
- * Copy a bignum from in to out.
- * If the output is shorter than the input, copy lower-order littlenums.
- * Return 0 or the number of significant littlenums dropped.
- * Assumes littlenum arrays are densely packed: no unused chars between
- * the littlenums. Uses memcpy() to move littlenums, and wants to
- * know length (in chars) of the input bignum.
- */
-
-/* void */
-int
-bignum_copy (register LITTLENUM_TYPE *in,
- register int in_length, /* in sizeof(littlenum)s */
- register LITTLENUM_TYPE *out,
- register int out_length /* in sizeof(littlenum)s */)
-{
- int significant_littlenums_dropped;
-
- if (out_length < in_length)
- {
- LITTLENUM_TYPE *p; /* -> most significant (non-zero) input
- littlenum. */
-
- memcpy ((void *) out, (void *) in,
- (unsigned int) out_length << LITTLENUM_SHIFT);
- for (p = in + in_length - 1; p >= in; --p)
- {
- if (*p)
- break;
- }
- significant_littlenums_dropped = p - in - in_length + 1;
-
- if (significant_littlenums_dropped < 0)
- {
- significant_littlenums_dropped = 0;
- }
- }
- else
- {
- memcpy ((char *) out, (char *) in,
- (unsigned int) in_length << LITTLENUM_SHIFT);
-
- if (out_length > in_length)
- {
- memset ((char *) (out + in_length),
- '\0',
- (unsigned int) (out_length - in_length) << LITTLENUM_SHIFT);
- }
-
- significant_littlenums_dropped = 0;
- }
-
- return (significant_littlenums_dropped);
-} /* bignum_copy() */
-
-/* end of bignum-copy.c */
diff --git a/gas/bignum.h b/gas/bignum.h
index 31c48c3..fea604c 100644
--- a/gas/bignum.h
+++ b/gas/bignum.h
@@ -1,5 +1,5 @@
/* bignum.h-arbitrary precision integers
- Copyright 1987, 1992, 2003 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 2003, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -39,14 +39,3 @@
#endif
typedef unsigned short LITTLENUM_TYPE;
-
-/* JF truncated this to get around a problem with GCC */
-#define LOG_TO_BASE_2_OF_10 (3.3219280948873623478703194294893901758651)
-/* WARNING: I haven't checked that the trailing digits are correct! */
-
-/* lengths are in sizeof(littlenum)s */
-
-int bignum_copy (LITTLENUM_TYPE * in, int in_length,
- LITTLENUM_TYPE * out, int out_length);
-
-/* end of bignum.h */
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index b00275e..efa8a01 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -2475,7 +2475,7 @@ c_symbol_merge (symbolS *debug, symbolS *normal)
SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug));
}
-unsigned int dim_index;
+static unsigned int dim_index;
static void
obj_coff_endef (int ignore ATTRIBUTE_UNUSED)
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 4defd01..c3b2472 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -324,7 +324,7 @@ static unsigned int cpu_arch_flags = CpuUnknownFlags | CpuNo64;
static unsigned int no_cond_jump_promotion = 0;
/* Pre-defined "_GLOBAL_OFFSET_TABLE_". */
-symbolS *GOT_symbol;
+static symbolS *GOT_symbol;
/* The dwarf2 return column, adjusted for 32 or 64 bit. */
unsigned int x86_dwarf2_return_column;
@@ -4971,7 +4971,7 @@ md_atof (type, litP, sizeP)
return 0;
}
-char output_invalid_buf[8];
+static char output_invalid_buf[8];
static char *
output_invalid (c)
diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c
index fef859e..ac1b94d 100644
--- a/gas/config/tc-vax.c
+++ b/gas/config/tc-vax.c
@@ -348,6 +348,60 @@ md_chars_to_number (con, nbytes)
}
return retval;
}
+
+/*
+ * Copy a bignum from in to out.
+ * If the output is shorter than the input, copy lower-order
+ * littlenums. Return 0 or the number of significant littlenums
+ * dropped. Assumes littlenum arrays are densely packed: no unused
+ * chars between the littlenums. Uses memcpy() to move littlenums, and
+ * wants to know length (in chars) of the input bignum.
+ */
+
+static int
+bignum_copy (register LITTLENUM_TYPE *in,
+ register int in_length, /* in sizeof(littlenum)s */
+ register LITTLENUM_TYPE *out,
+ register int out_length /* in sizeof(littlenum)s */)
+{
+ int significant_littlenums_dropped;
+
+ if (out_length < in_length)
+ {
+ LITTLENUM_TYPE *p; /* -> most significant (non-zero) input
+ littlenum. */
+
+ memcpy ((void *) out, (void *) in,
+ (unsigned int) out_length << LITTLENUM_SHIFT);
+ for (p = in + in_length - 1; p >= in; --p)
+ {
+ if (*p)
+ break;
+ }
+ significant_littlenums_dropped = p - in - in_length + 1;
+
+ if (significant_littlenums_dropped < 0)
+ {
+ significant_littlenums_dropped = 0;
+ }
+ }
+ else
+ {
+ memcpy ((char *) out, (char *) in,
+ (unsigned int) in_length << LITTLENUM_SHIFT);
+
+ if (out_length > in_length)
+ {
+ memset ((char *) (out + in_length),
+ '\0',
+ (unsigned int) (out_length - in_length) << LITTLENUM_SHIFT);
+ }
+
+ significant_littlenums_dropped = 0;
+ }
+
+ return (significant_littlenums_dropped);
+}
/* vax:md_assemble() emit frags for 1 instruction */
diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi
index e21a759..1770a44 100644
--- a/gas/doc/internals.texi
+++ b/gas/doc/internals.texi
@@ -1893,9 +1893,8 @@ after all input has been read, but messages about fixups should refer to the
original filename and line number that they are applicable to.
@end deftypefun
-@deftypefun @{@} void fprint_value (FILE *@var{file}, valueT @var{val})
-@deftypefunx @{@} void sprint_value (char *@var{buf}, valueT @var{val})
-These functions are helpful for converting a @code{valueT} value into printable
+@deftypefun @{@} void sprint_value (char *@var{buf}, valueT @var{val})
+This function is helpful for converting a @code{valueT} value into printable
format, in case it's wider than modes that @code{*printf} can handle. If the
type is narrow enough, a decimal number will be produced; otherwise, it will be
in hexadecimal. The value itself is not examined to make this determination.
diff --git a/gas/expr.c b/gas/expr.c
index f597c41..c573fa5 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -157,33 +157,6 @@ expr_build_uconstant (offsetT value)
return make_expr_symbol (&e);
}
-/* Build an expression for OP s1. */
-
-symbolS *
-expr_build_unary (operatorT op, symbolS *s1)
-{
- expressionS e;
-
- e.X_op = op;
- e.X_add_symbol = s1;
- e.X_add_number = 0;
- return make_expr_symbol (&e);
-}
-
-/* Build an expression for s1 OP s2. */
-
-symbolS *
-expr_build_binary (operatorT op, symbolS *s1, symbolS *s2)
-{
- expressionS e;
-
- e.X_op = op;
- e.X_add_symbol = s1;
- e.X_op_symbol = s2;
- e.X_add_number = 0;
- return make_expr_symbol (&e);
-}
-
/* Build an expression for the current location ('.'). */
symbolS *
@@ -213,8 +186,6 @@ FLONUM_TYPE generic_floating_point_number = {
0 /* sign. */
};
-/* If nonzero, we've been asked to assemble nan, +inf or -inf. */
-int generic_floating_point_magic;
static void
floating_constant (expressionS *expressionP)
diff --git a/gas/expr.h b/gas/expr.h
index 1d968e7..9a3d9ed 100644
--- a/gas/expr.h
+++ b/gas/expr.h
@@ -166,6 +166,4 @@ extern symbolS *make_expr_symbol (expressionS * expressionP);
extern int expr_symbol_where (symbolS *, char **, unsigned int *);
extern symbolS *expr_build_uconstant (offsetT);
-extern symbolS *expr_build_unary (operatorT, symbolS *);
-extern symbolS *expr_build_binary (operatorT, symbolS *, symbolS *);
extern symbolS *expr_build_dot (void);
diff --git a/gas/hash.c b/gas/hash.c
index bc534e6..29c97b9 100644
--- a/gas/hash.c
+++ b/gas/hash.c
@@ -294,31 +294,6 @@ hash_jam (struct hash_control *table, const char *key, PTR value)
return NULL;
}
-/* Replace an existing entry in a hash table. This returns the old
- value stored for the entry. If the entry is not found in the hash
- table, this does nothing and returns NULL. */
-
-PTR
-hash_replace (struct hash_control *table, const char *key, PTR value)
-{
- struct hash_entry *p;
- PTR ret;
-
- p = hash_lookup (table, key, NULL, NULL);
- if (p == NULL)
- return NULL;
-
-#ifdef HASH_STATISTICS
- ++table->replacements;
-#endif
-
- ret = p->data;
-
- p->data = value;
-
- return ret;
-}
-
/* Find an entry in a hash table, returning its value. Returns NULL
if the entry is not found. */
@@ -334,35 +309,6 @@ hash_find (struct hash_control *table, const char *key)
return p->data;
}
-/* Delete an entry from a hash table. This returns the value stored
- for that entry, or NULL if there is no such entry. */
-
-PTR
-hash_delete (struct hash_control *table, const char *key)
-{
- struct hash_entry *p;
- struct hash_entry **list;
-
- p = hash_lookup (table, key, &list, NULL);
- if (p == NULL)
- return NULL;
-
- if (p != *list)
- abort ();
-
-#ifdef HASH_STATISTICS
- ++table->deletions;
-#endif
-
- *list = p->next;
-
- /* Note that we never reclaim the memory for this entry. If gas
- ever starts deleting hash table entries in a big way, this will
- have to change. */
-
- return p->data;
-}
-
/* Traverse a hash table. Call the function on every entry in the
hash table. */
diff --git a/gas/hash.h b/gas/hash.h
index 09c52f8..4556f10 100644
--- a/gas/hash.h
+++ b/gas/hash.h
@@ -51,23 +51,11 @@ extern const char *hash_insert (struct hash_control *,
extern const char *hash_jam (struct hash_control *,
const char *key, PTR value);
-/* Replace an existing entry in a hash table. This returns the old
- value stored for the entry. If the entry is not found in the hash
- table, this does nothing and returns NULL. */
-
-extern PTR hash_replace (struct hash_control *, const char *key,
- PTR value);
-
/* Find an entry in a hash table, returning its value. Returns NULL
if the entry is not found. */
extern PTR hash_find (struct hash_control *, const char *key);
-/* Delete an entry from a hash table. This returns the value stored
- for that entry, or NULL if there is no such entry. */
-
-extern PTR hash_delete (struct hash_control *, const char *key);
-
/* Traverse a hash table. Call the function on every entry in the
hash table. */
diff --git a/gas/input-file.c b/gas/input-file.c
index a8fc9e5..2c07f4c 100644
--- a/gas/input-file.c
+++ b/gas/input-file.c
@@ -80,12 +80,6 @@ input_file_buffer_size (void)
return (BUFFER_SIZE);
}
-int
-input_file_is_open (void)
-{
- return f_in != (FILE *) 0;
-}
-
/* Push the state of our input, returning a pointer to saved info that
can be restored with input_file_pop (). */
diff --git a/gas/input-file.h b/gas/input-file.h
index 84577c7..8e5fbef 100644
--- a/gas/input-file.h
+++ b/gas/input-file.h
@@ -58,7 +58,6 @@
char *input_file_give_next_buffer (char *where);
char *input_file_push (void);
unsigned int input_file_buffer_size (void);
-int input_file_is_open (void);
void input_file_begin (void);
void input_file_close (void);
void input_file_end (void);
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index 2657b8a..04a8c1a 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -123,7 +123,6 @@ struct input_save {
static struct input_save *input_scrub_push (char *saved_position);
static char *input_scrub_pop (struct input_save *arg);
-static void as_1_char (unsigned int c, FILE * stream);
/* Saved information about the file that .include'd this one. When we hit EOF,
we automatically pop to that file. */
@@ -476,39 +475,3 @@ as_where (char **namep, unsigned int *linep)
*linep = 0;
}
}
-
-/* Output to given stream how much of line we have scanned so far.
- Assumes we have scanned up to and including input_line_pointer.
- No free '\n' at end of line. */
-
-void
-as_howmuch (FILE *stream /* Opened for write please. */)
-{
- register char *p; /* Scan input line. */
-
- for (p = input_line_pointer - 1; *p != '\n'; --p)
- {
- }
- ++p; /* p->1st char of line. */
- for (; p <= input_line_pointer; p++)
- {
- /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */
- as_1_char ((unsigned char) *p, stream);
- }
-}
-
-static void
-as_1_char (unsigned int c, FILE *stream)
-{
- if (c > 127)
- {
- (void) putc ('%', stream);
- c -= 128;
- }
- if (c < 32)
- {
- (void) putc ('^', stream);
- c += '@';
- }
- (void) putc (c, stream);
-}
diff --git a/gas/macro.c b/gas/macro.c
index f7d53bc..6f370bb 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -94,7 +94,7 @@ static void free_macro(macro_entry *);
/* The macro hash table. */
-struct hash_control *macro_hash;
+static struct hash_control *macro_hash;
/* Whether any macros have been defined. */
diff --git a/gas/messages.c b/gas/messages.c
index 39842e9..067c5fc 100644
--- a/gas/messages.c
+++ b/gas/messages.c
@@ -470,24 +470,6 @@ as_abort (const char *file, int line, const char *fn)
/* Support routines. */
void
-fprint_value (FILE *file, valueT val)
-{
- if (sizeof (val) <= sizeof (long))
- {
- fprintf (file, "%ld", (long) val);
- return;
- }
-#ifdef BFD_ASSEMBLER
- if (sizeof (val) <= sizeof (bfd_vma))
- {
- fprintf_vma (file, val);
- return;
- }
-#endif
- abort ();
-}
-
-void
sprint_value (char *buf, valueT val)
{
if (sizeof (val) <= sizeof (long))
diff --git a/gas/read.c b/gas/read.c
index 54ac844..b99c011 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -211,6 +211,7 @@ static int dwarf_file_string;
#endif
#endif
+static void do_s_func (int end_p, const char *default_prefix);
static void do_align (int, char *, int, int);
static void s_align (int, int);
static void s_altmacro (int);
@@ -438,6 +439,27 @@ static const pseudo_typeS potable[] = {
{NULL, NULL, 0} /* End sentinel. */
};
+static offsetT
+get_absolute_expr (expressionS *exp)
+{
+ expression (exp);
+ if (exp->X_op != O_constant)
+ {
+ if (exp->X_op != O_absent)
+ as_bad (_("bad or irreducible absolute expression"));
+ exp->X_add_number = 0;
+ }
+ return exp->X_add_number;
+}
+
+offsetT
+get_absolute_expression (void)
+{
+ expressionS exp;
+
+ return get_absolute_expr (&exp);
+}
+
static int pop_override_ok = 0;
static const char *pop_table_name;
@@ -4461,7 +4483,7 @@ output_big_leb128 (char *p, LITTLENUM_TYPE *bignum, int size, int sign)
/* Generate the appropriate fragments for a given expression to emit a
leb128 value. */
-void
+static void
emit_leb128_expr (expressionS *exp, int sign)
{
operatorT op = exp->X_op;
@@ -4828,27 +4850,6 @@ get_known_segmented_expression (register expressionS *expP)
return (retval);
}
-offsetT
-get_absolute_expr (expressionS *exp)
-{
- expression (exp);
- if (exp->X_op != O_constant)
- {
- if (exp->X_op != O_absent)
- as_bad (_("bad or irreducible absolute expression"));
- exp->X_add_number = 0;
- }
- return exp->X_add_number;
-}
-
-offsetT
-get_absolute_expression (void)
-{
- expressionS exp;
-
- return get_absolute_expr (&exp);
-}
-
char /* Return terminator. */
get_absolute_expression_and_terminator (long *val_pointer /* Return value of expression. */)
{
@@ -5209,7 +5210,7 @@ s_func (int end_p)
/* Subroutine of s_func so targets can choose a different default prefix.
If DEFAULT_PREFIX is NULL, use the target's "leading char". */
-void
+static void
do_s_func (int end_p, const char *default_prefix)
{
/* Record the current function so that we can issue an error message for
diff --git a/gas/read.h b/gas/read.h
index 6fee126..08ef918 100644
--- a/gas/read.h
+++ b/gas/read.h
@@ -101,7 +101,6 @@ extern void aout_process_stab (int, const char *, int, int, int);
extern char *demand_copy_string (int *lenP);
extern char *demand_copy_C_string (int *len_pointer);
extern char get_absolute_expression_and_terminator (long *val_pointer);
-extern offsetT get_absolute_expr (expressionS *);
extern offsetT get_absolute_expression (void);
extern unsigned int next_char_of_string (void);
extern void s_mri_sect (char *);
@@ -111,7 +110,6 @@ extern void add_include_dir (char *path);
extern void cons (int nbytes);
extern void demand_empty_rest_of_line (void);
extern void emit_expr (expressionS *exp, unsigned int nbytes);
-extern void emit_leb128_expr (expressionS *, int);
extern void equals (char *sym_name, int reassign);
extern void float_cons (int float_type);
extern void ignore_rest_of_line (void);
@@ -155,7 +153,6 @@ extern void s_fail (int);
extern void s_fill (int);
extern void s_float_space (int mult);
extern void s_func (int);
-extern void do_s_func (int, const char *);
extern void s_globl (int arg);
extern void s_if (int arg);
extern void s_ifc (int arg);
diff --git a/gas/sb.c b/gas/sb.c
index 41f827f..dea3f76 100644
--- a/gas/sb.c
+++ b/gas/sb.c
@@ -50,21 +50,18 @@
*/
-#define dsize 5
-
+static int dsize = 5;
static void sb_check (sb *, int);
/* Statistics of sb structures. */
-
-int string_count[sb_max_power_two];
+static int string_count[sb_max_power_two];
/* Free list of sb structures. */
-
static sb_list_vector free_list;
/* initializes an sb. */
-void
+static void
sb_build (sb *ptr, int size)
{
/* see if we can find one to allocate */
@@ -168,54 +165,6 @@ sb_add_string (sb *ptr, const char *s)
ptr->len += len;
}
-/* add string at s of length len to sb at ptr */
-
-void
-sb_add_buffer (sb *ptr, const char *s, int len)
-{
- sb_check (ptr, len);
- memcpy (ptr->ptr + ptr->len, s, len);
- ptr->len += len;
-}
-
-/* print the sb at ptr to the output file */
-
-void
-sb_print (FILE *outfile, sb *ptr)
-{
- int i;
- int nc = 0;
-
- for (i = 0; i < ptr->len; i++)
- {
- if (nc)
- {
- fprintf (outfile, ",");
- }
- fprintf (outfile, "%d", ptr->ptr[i]);
- nc = 1;
- }
-}
-
-void
-sb_print_at (FILE *outfile, int idx, sb *ptr)
-{
- int i;
- for (i = idx; i < ptr->len; i++)
- putc (ptr->ptr[i], outfile);
-}
-
-/* put a null at the end of the sb at in and return the start of the
- string, so that it can be used as an arg to printf %s. */
-
-char *
-sb_name (sb *in)
-{
- /* stick a null on the end of the string */
- sb_add_char (in, 0);
- return in->ptr;
-}
-
/* like sb_name, but don't include the null byte in the string. */
char *
diff --git a/gas/sb.h b/gas/sb.h
index 3394eb6..f9788df 100644
--- a/gas/sb.h
+++ b/gas/sb.h
@@ -76,19 +76,12 @@ typedef struct
sb_element *size[sb_max_power_two];
} sb_list_vector;
-extern int string_count[sb_max_power_two];
-
-extern void sb_build (sb *, int);
extern void sb_new (sb *);
extern void sb_kill (sb *);
extern void sb_add_sb (sb *, sb *);
extern void sb_reset (sb *);
extern void sb_add_char (sb *, int);
extern void sb_add_string (sb *, const char *);
-extern void sb_add_buffer (sb *, const char *, int);
-extern void sb_print (FILE *, sb *);
-extern void sb_print_at (FILE *, int, sb *);
-extern char *sb_name (sb *);
extern char *sb_terminate (sb *);
extern int sb_skip_white (int, sb *);
extern int sb_skip_comma (int, sb *);
diff --git a/gas/symbols.c b/gas/symbols.c
index 9eaef16..68c93ec 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -197,7 +197,7 @@ static unsigned long local_symbol_conversion_count;
/* Create a local symbol and insert it into the local hash table. */
-struct local_symbol *
+static struct local_symbol *
local_symbol_make (const char *name, segT section, valueT value, fragS *frag)
{
char *name_copy;
@@ -794,19 +794,6 @@ verify_symbol_chain (symbolS *rootP, symbolS *lastP)
assert (lastP == symbolP);
}
-void
-verify_symbol_chain_2 (symbolS *sym)
-{
- symbolS *p = sym, *n = sym;
-#ifdef SYMBOLS_NEED_BACKPOINTERS
- while (symbol_previous (p))
- p = symbol_previous (p);
-#endif
- while (symbol_next (n))
- n = symbol_next (n);
- verify_symbol_chain (p, n);
-}
-
static void
report_op_error (symbolS *symp, symbolS *left, symbolS *right)
{
@@ -2361,7 +2348,7 @@ int indent_level;
/* Maximum indent level.
Available for modification inside a gdb session. */
-int max_indent_level = 8;
+static int max_indent_level = 8;
void
print_symbol_value_1 (FILE *file, symbolS *sym)
diff --git a/gas/symbols.h b/gas/symbols.h
index 1ce5f85..508239c 100644
--- a/gas/symbols.h
+++ b/gas/symbols.h
@@ -56,8 +56,6 @@ symbolS *symbol_new (const char *name, segT segment, valueT value,
fragS * frag);
symbolS *symbol_create (const char *name, segT segment, valueT value,
fragS * frag);
-struct local_symbol *local_symbol_make (const char *name, segT section,
- valueT value, fragS * frag);
symbolS *symbol_temp_new (segT, valueT, fragS *);
symbolS *symbol_temp_new_now (void);
symbolS *symbol_temp_make (void);
@@ -164,7 +162,6 @@ extern symbolS *symbol_previous (symbolS *);
#endif /* SYMBOLS_NEED_BACKPOINTERS */
void verify_symbol_chain (symbolS * rootP, symbolS * lastP);
-void verify_symbol_chain_2 (symbolS * symP);
void symbol_append (symbolS * addme, symbolS * target,
symbolS ** rootP, symbolS ** lastP);