From 25fd0ed4fb7c78ca8e23c3b44f19173b1ccb978e Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 2 Nov 1997 19:51:02 +0000 Subject: [PATCH] * objcopy.c: Move new struct and variable definitions to top of file. Remove obsolete add_strip_symbol and is_strip_symbol declarations. Add prototype declarations for add_specific_symbol and is_specified_symbol. --- binutils/ChangeLog | 7 +++++++ binutils/objcopy.c | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index a649a50..1cd0253 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +Sun Nov 2 14:49:56 1997 Ian Lance Taylor + + * objcopy.c: Move new struct and variable definitions to top of + file. Remove obsolete add_strip_symbol and is_strip_symbol + declarations. Add prototype declarations for add_specific_symbol + and is_specified_symbol. + Mon Oct 20 15:31:43 1997 Klaus K"ampf * configure.com (HAVE_SBRK): Undefine. diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 3483f20..f477695 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -33,6 +33,17 @@ #endif /* HAVE_UTIMES */ #endif /* ! HAVE_GOOD_UTIME_H */ +/* A list of symbols to explicitly strip out, or to keep. A linked + list is good enough for a small number from the command line, but + this will slow things down a lot if many symbols are being + deleted. */ + +struct symlist +{ + const char *name; + struct symlist *next; +}; + static void copy_usage PARAMS ((FILE *, int)); static void strip_usage PARAMS ((FILE *, int)); static flagword parse_flags PARAMS ((const char *)); @@ -41,8 +52,8 @@ static void setup_section PARAMS ((bfd *, asection *, PTR)); static void copy_section PARAMS ((bfd *, asection *, PTR)); static void get_sections PARAMS ((bfd *, asection *, PTR)); static int compare_section_vma PARAMS ((const PTR, const PTR)); -static void add_strip_symbol PARAMS ((const char *)); -static boolean is_strip_symbol PARAMS ((const char *)); +static void add_specific_symbol PARAMS ((const char *, struct symlist **)); +static boolean is_specified_symbol PARAMS ((const char *, struct symlist *)); static boolean is_strip_section PARAMS ((bfd *, asection *)); static unsigned int filter_symbols PARAMS ((bfd *, bfd *, asymbol **, asymbol **, long)); @@ -166,6 +177,17 @@ static boolean change_leading_char = false; static boolean remove_leading_char = false; +/* List of symbols to strip, keep, localize, and weaken. */ + +static struct symlist *strip_specific_list = NULL; +static struct symlist *keep_specific_list = NULL; +static struct symlist *localize_specific_list = NULL; +static struct symlist *weaken_specific_list = NULL; + +/* If this is true, we weaken global symbols (set BSF_WEAK). */ + +static boolean weaken = false; + /* 150 isn't special; it's just an arbitrary non-ASCII char value. */ #define OPTION_ADD_SECTION 150 @@ -379,28 +401,6 @@ find_section_list (name, add) return p; } -/* Make a list of symbols to explicitly strip out, or to keep. A - linked list is good enough for a small number from the command - line, but this will slow things down a lot if many symbols are - being deleted. */ - -struct symlist -{ - const char *name; - struct symlist *next; -}; - -/* List of symbols to strip, keep, localize, and weaken. */ - -static struct symlist *strip_specific_list = NULL; -static struct symlist *keep_specific_list = NULL; -static struct symlist *localize_specific_list = NULL; -static struct symlist *weaken_specific_list = NULL; - -/* If this is true, we weaken global symbols (set BSF_WEAK). */ - -static boolean weaken = false; - /* Add a symbol to strip_specific_list. */ static void -- 2.7.4