diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-11-02 19:51:02 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-11-02 19:51:02 +0000 |
commit | 25fd0ed4fb7c78ca8e23c3b44f19173b1ccb978e (patch) | |
tree | c955183da0a168b7c76b5635a5c1099cbe9ef7ad /binutils | |
parent | 0ac53ff04dbd409099b5f235780e13a23090001a (diff) | |
download | gdb-25fd0ed4fb7c78ca8e23c3b44f19173b1ccb978e.zip gdb-25fd0ed4fb7c78ca8e23c3b44f19173b1ccb978e.tar.gz gdb-25fd0ed4fb7c78ca8e23c3b44f19173b1ccb978e.tar.bz2 |
* 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.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 7 | ||||
-rw-r--r-- | 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 <ian@cygnus.com> + + * 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 <kkaempf@progis.de> * 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 |