This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sweep ld with 'findstatic.pl'


Last one.

2005-04-27  Ben Elliston  <bje@au.ibm.com>

	* ldgram.y (lang_memory_region_type): Make static.
	(ldgram_want_filename): Likewise.
	* ldemul.c (ld_emulation): Make static.
	* ldfile.h (ldfile_find_command_file): Remove extern.
	* ldfile.c (ldfile_find_command_file): Make static.
	* ldlang.h (unique_section_list): Remove extern declaration.
	* ldlang.c (unique_section_list): Make static.
	* mri.h (symbol_truncate): Remove extern declaration.
	* mri.c (symbol_truncate): Make static.
	(order, only_load, address, alias): Likewise.
	(alignment, subalignment): Likewise.

Index: ldemul.c
===================================================================
RCS file: /home/bje/src-cvs/src/ld/ldemul.c,v
retrieving revision 1.17
diff -u -p -r1.17 ldemul.c
--- ldemul.c	4 Apr 2005 11:27:15 -0000	1.17
+++ ldemul.c	27 Apr 2005 03:42:31 -0000
@@ -34,7 +34,7 @@ Software Foundation, 59 Temple Place - S
 #include "ldmain.h"
 #include "ldemul-list.h"

-ld_emulation_xfer_type *ld_emulation;
+static ld_emulation_xfer_type *ld_emulation;

 void
 ldemul_hll (char *name)
Index: ldfile.c
===================================================================
RCS file: /home/bje/src-cvs/src/ld/ldfile.c,v
retrieving revision 1.38
diff -u -p -r1.38 ldfile.c
--- ldfile.c	3 Mar 2005 11:51:58 -0000	1.38
+++ ldfile.c	27 Apr 2005 03:42:31 -0000
@@ -45,12 +45,12 @@ enum bfd_architecture ldfile_output_arch
 search_dirs_type * search_head;

 #ifdef VMS
-char * slash = "";
+static char * slash = "";
 #else
 #if defined (_WIN32) && ! defined (__CYGWIN32__)
-char * slash = "\\";
+static char * slash = "\\";
 #else
-char * slash = "/";
+static char * slash = "/";
 #endif
 #endif

@@ -462,7 +462,7 @@ try_open (const char *name, const char *
 /* Try to open NAME; if that fails, look for it in any directories
    specified with -L, without and with EXTEND appended.  */

-FILE *
+static FILE *
 ldfile_find_command_file (const char *name, const char *extend)
 {
   search_dirs_type *search;
Index: ldfile.h
===================================================================
RCS file: /home/bje/src-cvs/src/ld/ldfile.h,v
retrieving revision 1.13
diff -u -p -r1.13 ldfile.h
--- ldfile.h	3 Jan 2004 11:09:06 -0000	1.13
+++ ldfile.h	27 Apr 2005 03:42:31 -0000
@@ -54,8 +54,6 @@ extern void ldfile_open_file
   (struct lang_input_statement_struct *);
 extern bfd_boolean ldfile_try_open_bfd
   (const char *, struct lang_input_statement_struct *);
-extern FILE *ldfile_find_command_file
-  (const char *name, const char *extend);
 extern void ldfile_set_output_arch
   (const char *, enum bfd_architecture);
 extern bfd_boolean ldfile_open_file_search
Index: ldgram.y
===================================================================
RCS file: /home/bje/src-cvs/src/ld/ldgram.y,v
retrieving revision 1.39
diff -u -p -r1.39 ldgram.y
--- ldgram.y	21 Jan 2005 12:04:25 -0000	1.39
+++ ldgram.y	27 Apr 2005 03:42:31 -0000
@@ -46,10 +46,9 @@
 #endif

 static enum section_type sectype;
+static lang_memory_region_type *region;

-lang_memory_region_type *region;
-
-bfd_boolean ldgram_want_filename = TRUE;
+static bfd_boolean ldgram_want_filename = TRUE;
 FILE *saved_script_handle = NULL;
 bfd_boolean force_make_executable = FALSE;

Index: ldlang.c
===================================================================
RCS file: /home/bje/src-cvs/src/ld/ldlang.c,v
retrieving revision 1.177
diff -u -p -r1.177 ldlang.c
--- ldlang.c	6 Apr 2005 15:33:02 -0000	1.177
+++ ldlang.c	27 Apr 2005 03:42:31 -0000
@@ -97,7 +97,7 @@ bfd_boolean had_output_filename = FALSE;
 bfd_boolean lang_float_flag = FALSE;
 bfd_boolean delete_output_file_on_failure = FALSE;
 struct lang_nocrossrefs *nocrossref_list;
-struct unique_sections *unique_section_list;
+static struct unique_sections *unique_section_list;
 static bfd_boolean ldlang_sysrooted_script = FALSE;
 int lang_statement_iteration = 0;

Index: ldlang.h
===================================================================
RCS file: /home/bje/src-cvs/src/ld/ldlang.h,v
retrieving revision 1.45
diff -u -p -r1.45 ldlang.h
--- ldlang.h	6 Apr 2005 15:33:03 -0000	1.45
+++ ldlang.h	27 Apr 2005 03:42:31 -0000
@@ -432,8 +432,6 @@ struct orphan_save {
   lang_output_section_statement_type **os_tail;
 };

-extern struct unique_sections *unique_section_list;
-
 extern lang_output_section_statement_type *abs_output_section;
 extern lang_statement_list_type lang_output_section_statement;
 extern bfd_boolean lang_has_input_file;
Index: mri.c
===================================================================
RCS file: /home/bje/src-cvs/src/ld/mri.c,v
retrieving revision 1.18
diff -u -p -r1.18 mri.c
--- mri.c	3 Mar 2005 11:52:01 -0000	1.18
+++ mri.c	27 Apr 2005 03:42:31 -0000
@@ -44,14 +44,14 @@ struct section_name_struct {
   int ok_to_load;
 };

-unsigned int symbol_truncate = 10000;
-struct section_name_struct *order;
-struct section_name_struct *only_load;
-struct section_name_struct *address;
-struct section_name_struct *alias;
+static unsigned int symbol_truncate = 10000;
+static struct section_name_struct *order;
+static struct section_name_struct *only_load;
+static struct section_name_struct *address;
+static struct section_name_struct *alias;

-struct section_name_struct *alignment;
-struct section_name_struct *subalignment;
+static struct section_name_struct *alignment;
+static struct section_name_struct *subalignment;

 static struct section_name_struct **
 lookup (const char *name, struct section_name_struct **list)
Index: mri.h
===================================================================
RCS file: /home/bje/src-cvs/src/ld/mri.h,v
retrieving revision 1.3
diff -u -p -r1.3 mri.h
--- mri.h	28 Jun 2003 05:28:54 -0000	1.3
+++ mri.h	27 Apr 2005 03:42:31 -0000
@@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suit
 #ifndef MRI_H
 #define MRI_H

-extern unsigned int symbol_truncate;
-
 extern void mri_output_section (const char *, etree_type *);
 extern void mri_only_load (const char *);
 extern void mri_base (etree_type *);

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]