From 00ce9deb436f0546db143c24c05964f68e2fa7c1 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 12 Oct 2011 02:57:07 +0000 Subject: [PATCH] * symbols.c (local_symbol_make): Make global. * symbols.h (local_symbol_make): Declare. * as.c (main): Define __GAS_VERSION__. --- gas/ChangeLog | 6 ++++++ gas/as.c | 3 +++ gas/symbols.c | 4 +--- gas/symbols.h | 2 ++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index ca67c2e..a67250e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2011-10-12 Alan Modra + + * symbols.c (local_symbol_make): Make global. + * symbols.h (local_symbol_make): Declare. + * as.c (main): Define __GAS_VERSION__. + 2011-10-10 Nick Clifton * po/es.po: Updated Spanish translation. diff --git a/gas/as.c b/gas/as.c index e58d861..650c4f2 100644 --- a/gas/as.c +++ b/gas/as.c @@ -1206,6 +1206,9 @@ main (int argc, char ** argv) dwarf2_init (); + local_symbol_make ("__GAS_VERSION__", absolute_section, + BFD_VERSION / 10000UL, &zero_address_frag); + /* Now that we have fully initialized, and have created the output file, define any symbols requested by --defsym command line arguments. */ diff --git a/gas/symbols.c b/gas/symbols.c index fc475ca..b5d5a43 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -23,11 +23,9 @@ /* #define DEBUG_SYMS / * to debug symbol list maintenance. */ #include "as.h" - #include "safe-ctype.h" #include "obstack.h" /* For "symbols.h" */ #include "subsegs.h" - #include "struc-symbol.h" /* This is non-zero if symbols are case sensitive, which is the @@ -191,7 +189,7 @@ static unsigned long local_symbol_conversion_count; /* Create a local symbol and insert it into the local hash table. */ -static struct local_symbol * +struct local_symbol * local_symbol_make (const char *name, segT section, valueT val, fragS *frag) { char *name_copy; diff --git a/gas/symbols.h b/gas/symbols.h index 1d5b2a3..7c9896f 100644 --- a/gas/symbols.h +++ b/gas/symbols.h @@ -50,6 +50,8 @@ 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 val, fragS *frag); symbolS *symbol_clone (symbolS *, int); #undef symbol_clone_if_forward_ref symbolS *symbol_clone_if_forward_ref (symbolS *, int); -- 2.7.4